-
Notifications
You must be signed in to change notification settings - Fork 280
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
rule.exported: add feature to disable selected warnings for rule (const,method,function) #1047
Merged
chavacava
merged 7 commits into
mgechev:master
from
mfederowicz:exported-disable-kind-warnings
Oct 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
498ffb7
rule.exported: add feature to disable selected warnings for rule
mfederowicz 53963e1
fix test: replace interface to any
mfederowicz 2669968
Merge remote-tracking branch 'upstream/master' into exported-disable-…
mfederowicz 2f4065a
review cleanup
mfederowicz 9826961
Update RULES_DESCRIPTIONS.md
chavacava 59bbbb6
Update exported.go
chavacava 887a4b0
Update exported_test.go
chavacava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Package golint comment | ||
package golint | ||
|
||
|
||
// path separator defined by os.Separator. | ||
const FilePath = "xyz" | ||
|
||
|
||
// Rewrite string to remove non-standard path characters | ||
func UnicodeSanitize(s string) string {} | ||
|
||
|
||
// Tags returns a slice of tags. The order is the original tag order unless it | ||
// was changed. | ||
func (t *Tags) Keys() []string {} | ||
|
||
// A value which may be passed to the which parameter for Getitimer and | ||
type ItimerWhich int | ||
|
||
|
||
/* | ||
// PropertyBag | ||
*/ | ||
// Rectangle An area within an image. | ||
type Rectangle struct {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the configuration entry gives no clue about the "ignore" nature of the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i try struct with dedicated fields but in toml there is problem with notation like:
IgnoredWarnings{field:true,field2:true}
you can only use like this:
{field:true,field2:true} or list ["val","val2","val3"]
but there is no option to name/prefix that (or maybe I dont know the magic yet :()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what @chavacava is asking is to have a better naming of the setting, e.g.
disableFunctionDocumentationCheck
instead offunction
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so each element of ["function","method","type","var"] as dedicated flag
arguments = ["disableFunctionCheck", "disableMethodCheck", "disableTypeCheck", "disableVarCheck"]
that was my first idea, but thinks using array/slice will be simpler (one place to modify) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok maybe we can walk that way:
arguments = ["disableFunctionCheck", "disableMethodCheck", "disableTypeCheck", "disableVarCheck"]
and of course modify my commited code to use that flags insted of additional array in config what you think @chavacava ?