Commit df19461
authored
## π« Ticket
https://jira.cms.gov/browse/BCDA-9225
## π Changes
- configured the standard golangci-lint pre-commit hook to replace the
wrapper hook we had been using before
- set predefined versions for our linters that we can update ourselves
(this version management may change when we upgrade to go 1.24)
- updated configuration of ci linter to specifically lint the changes
that are different from main
- configured setup-go job to fetch the go version from go.mod in all
workflows
- changed create-group integration test to hard delete created group
instead of soft delete
<!-- What was added, updated, or removed in this PR? -->
## βΉοΈ Context
There are two golang-ci linters configured for this repo: one in a
pre-commit hook, and one in a docker container which is run by a make
command during ci-checks.
The goals for my changes here were the following:
- reduce the number of false positives with pre-commit linting errors.
this was addressed by changing the pre-commit linting scope from "every
package of every updated file" to "every updated line" -- there was
clearly something buggy about the former, but I'm not quite sure what it
was.
- bring the pre-commit and the ci-checks linters closer together with
respect to their versions and the results they create
- ensure that the pre-commit linter does not take too long
- define a set version for the linters that we can increment manually,
so as to increase the stability of our ci workflow
- only lint new changes for a specific commit during the pre-commit hook
- lint all changes to main for the PR linter
Also for the create-group integration test, it turns out soft deleting
the group is not enough to make the test re-runnable
## π§ͺ Validation
for the linters:
1. create a new branch from this branch
2. make an update to any go file with a linting error. when you try to
commit, the pre-commit hook should catch the error and not raise a bunch
of false positives
3. commit the error from step 2 with `go commit --no-verify` and push
the branch. verify that the `ci-checks` workflow catches the error
for the create-group workflow:
1. run the workflow and verify that it passes
2. immediately re-run the workflow and verify that it passes again
<!-- How were the changes verified? Did you fully test the acceptance
criteria in the ticket? Provide reproducible testing instructions and
screenshots if applicable. -->
1 parent ff2249a commit df19461
File tree
12 files changed
+23
-23
lines changed- .github/workflows
- Dockerfiles
12 files changed
+23
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
0 commit comments