Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linting by using new maligned linter instead of aligncheck #659

Merged
merged 2 commits into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deb/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ func (repo *RemoteRepo) Decode(input []byte) error {
if err != nil {
if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") {
// probably it is broken DB from go < 1.2, try decoding w/o time.Time
var repo11 struct {
var repo11 struct { // nolint: maligned
UUID string
Name string
ArchiveRoot string
Expand Down
2 changes: 1 addition & 1 deletion linter.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"staticcheck",
"varcheck",
"structcheck",
"aligncheck",
"maligned",
"vetshadow",
"goconst",
"interfacer"
Expand Down
8 changes: 4 additions & 4 deletions system/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def get_gold(self, gold_name="gold"):
def check_output(self):
try:
self.verify_match(self.get_gold(), self.output, match_prepare=self.outputMatchPrepare)
except:
except: # noqa: E722
if self.captureResults:
if self.outputMatchPrepare is not None:
self.output = self.outputMatchPrepare(self.output)
Expand All @@ -207,7 +207,7 @@ def check_cmd_output(self, command, gold_name, match_prepare=None, expected_code
output = self.run_cmd(command, expected_code=expected_code)
try:
self.verify_match(self.get_gold(gold_name), output, match_prepare)
except:
except: # noqa: E722
if self.captureResults:
if match_prepare is not None:
output = match_prepare(output)
Expand All @@ -228,7 +228,7 @@ def check_file_contents(self, path, gold_name, match_prepare=None):
try:

self.verify_match(self.get_gold(gold_name), contents, match_prepare=match_prepare)
except:
except: # noqa: E722
if self.captureResults:
if match_prepare is not None:
contents = match_prepare(contents)
Expand All @@ -241,7 +241,7 @@ def check_file(self):
contents = open(self.checkedFile, "r").read()
try:
self.verify_match(self.get_gold(), contents)
except:
except: # noqa: E722
if self.captureResults:
with open(self.get_gold_filename(), "w") as f:
f.write(contents)
Expand Down
2 changes: 1 addition & 1 deletion utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// ConfigStructure is structure of main configuration
type ConfigStructure struct { // nolint: aligncheck
type ConfigStructure struct { // nolint: maligned
RootDir string `json:"rootDir"`
DownloadConcurrency int `json:"downloadConcurrency"`
DownloadLimit int64 `json:"downloadSpeedLimit"`
Expand Down