-
Notifications
You must be signed in to change notification settings - Fork 54
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
Initial implementation of lint
subcommand
#2
Conversation
Related to wolfi-dev/os#86 Signed-off-by: Furkan <furkan.turkal@trendyol.com> Co-authored-by: Batuhan<batuhan.apaydin@trendyol.com> Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
lint
subcommand
this looks great! I think we can merge on the agreement of a followup PR to add tests if that's ok with you?
Yeah let's return 1 so that we can easily fail CI? |
Or if you prefer to add a test to this PR that's probably better and good practice. To answer the initial question I think this is a great start and we can iterate over time to improve. |
bc02708
to
d31c31a
Compare
Makes sense! We will add some test cases in this PR. (+ |
perfect - one more thing you might want to do is run |
We also thought enabling/disabling options for the available linting rules might be a good option, WDYT? |
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
d31c31a
to
eba9d09
Compare
yeah that sounds good though maybe as a followup PR? |
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.
Just waiting on this and we should be good to go #2 (comment)
Signed-off-by: Furkan <furkan.turkal@trendyol.com> Co-authored-by: Batuhan <batuhan.apaydin@trendyol.com>
I think we are ready for the review! @rawlingsj
|
@Dentrax @developer-guy great work! |
I'll look at getting wolfi os using the new linter and see how we go. |
Thanks for such prompt merge! Looking forward to the new rules! 🚀 |
This PR initially implements brand-new
lint
subcommand as we discussed: wolfi-dev/os#86lint
subcommandno-makefile-entry-for-package
,valid-copyright-header
andvalid-pipeline-fetch-uri
(for test purposes)gofumpt -w -extra .
across project (some intentional changes has made)melange.go
for code deduplicationFuture ideas:
/rules
folder to separate rules (as godolint did)Known Bug?:
secfixes
didn't introduce inbuild.Configuration
yet onmain
branch but generally used in the package files.Example Output:
(Exit code is
0
, should we return1
? (if severity >= ERROR))/cc @rawlingsj @developer-guy
Signed-off-by: Furkan furkan.turkal@trendyol.com
Co-authored-by: Batuhanbatuhan.apaydin@trendyol.com