-
Notifications
You must be signed in to change notification settings - Fork 51
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
ci(i): Add YAML linter #2241
ci(i): Add YAML linter #2241
Conversation
@@ -66,7 +66,11 @@ jobs: | |||
if (branch.startsWith('${{ github.event.inputs.branchPrefix }}')) { | |||
console.log('Branch matched prefix: ' + branch); | |||
let statusOK = true; | |||
if(${{ github.event.inputs.mustBeGreen }}) { | |||
if ($ { |
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.
Most of this code was auto formatted through prettier.
The [Optional] action that fails is because of the check that enforces to use branch-flow if ever touched files in:
Should be fine to dismiss as the only changes in that file are trimming ending white spaces. |
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.
Looks mostly positive, however I think it has damaged readability in at least one location and needs a bit of tweaking IMO.
const [{ commit }] = result.repository.pullRequest.commits.nodes; | ||
const [{ | ||
commit | ||
}] = result.repository.pullRequest.commits.nodes; |
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.
thought: This looked nicer before
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.
This line should pass either way now. Can revert this one to look like before.
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.
fixed.
branch, | ||
prString | ||
} | ||
of branchesAndPRStrings) { |
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.
todo: This looked much nicer before. What was responsible for this change? Can we please tweak whatever did this so that it does not?
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.
This is the fault of the prettier formatter i was using for Javascript code. Should pass still with how it looked before, will fix.
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.
fixed
Makefile
Outdated
else | ||
$(info YAML linter 'yamllint' and `pip` both not found.) | ||
endif | ||
ifeq (, $(shell which yamllint)) # If yamllint still not installed then try this: |
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.
question: Sorry I missed this on first review. Are you sure this is really worth it? I am somewhat sceptical - did you hit problems in the CI?
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 first method failed to install on one of the machines (not ci, locally) so provided the alternative. This just ensure like previously when we did make deps:lint
it can install the linter regardless of which machine we are on. Not as easy to do this since its not a go tool haha like the go linter which would install easily.
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.
This only needs to work in the CI though really no? I'd rather not have us maintain a list of every possible installation pathway for every non-go dependency we end up having. Not to mention that it will 'break' every time a new pathway becomes available/common.
Can just add a line in the readme noting this linter is a dependency, and then the machine owner can install it in whatever way they prefer. Having that choice if probably preferred by a bunch of people who may have multiple package managers installed (e.g. if they have one main, and then at some point in the distant past had to install another for a very specific nuisance package, and that one-off gets auto-picked up by us first).
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'm also not sure people would appreciate random sudo
calls in our make file either.
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.
Yea, I guess that's one way so we don't have to worry about the nastiness of building and maintaining every possible way to download a dependency. We could perhaps adopt the strategy that if it is not-a-go tool we just document it and not provide utility methods to install it.
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.
- will remove, unless someone else has a stronger opinion
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'm also in favour or removing it 👍
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.
Removed, please re-review
88cc751
to
38cf79a
Compare
38cf79a
to
66ebea4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2241 +/- ##
===========================================
+ Coverage 74.03% 74.07% +0.03%
===========================================
Files 256 256
Lines 25739 25739
===========================================
+ Hits 19055 19064 +9
+ Misses 5364 5357 -7
+ Partials 1320 1318 -2
Flags with carried forward coverage won't be shown. Click here to find out more. see 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
66ebea4
to
16ce856
Compare
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.
LGTM :) Thanks Shahzad
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.
👍
## Relevant issue(s) - Resolves #2245 ## Description - Basic YAML linter Action - Fix all YAML linter errors - PR title change when using the manual action to combine dependabot PRs - Update default options of the combine action according to our common usage ## How has this been tested? - CI checks for this now Specify the platform(s) on which this was tested: - WSL (Manjaro)
## Relevant issue(s) - Resolves sourcenetwork#2245 ## Description - Basic YAML linter Action - Fix all YAML linter errors - PR title change when using the manual action to combine dependabot PRs - Update default options of the combine action according to our common usage ## How has this been tested? - CI checks for this now Specify the platform(s) on which this was tested: - WSL (Manjaro)
## Relevant issue(s) - Resolves sourcenetwork#2245 ## Description - Basic YAML linter Action - Fix all YAML linter errors - PR title change when using the manual action to combine dependabot PRs - Update default options of the combine action according to our common usage ## How has this been tested? - CI checks for this now Specify the platform(s) on which this was tested: - WSL (Manjaro)
## Relevant issue(s) - Resolves sourcenetwork#2245 ## Description - Basic YAML linter Action - Fix all YAML linter errors - PR title change when using the manual action to combine dependabot PRs - Update default options of the combine action according to our common usage ## How has this been tested? - CI checks for this now Specify the platform(s) on which this was tested: - WSL (Manjaro)
Relevant issue(s)
Description
How has this been tested?
Specify the platform(s) on which this was tested: