Skip to content

Commit

Permalink
fix(rules): add GolangCI Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Oct 12, 2023
1 parent a5ecfc5 commit 57e02c3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ exports[`all > should match everything 1`] = `
"gitlab.ci",
"goacmelego",
"golang",
"golangcilint",
"googleanalytics",
"grafana",
"hashicorp_vault",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/docker/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`docker > should match everything 1`] = `
"elasticsearch",
"gitguardian",
"goacmelego",
"golangcilint",
"grafana",
"hashicorp_vault",
"httpd",
Expand Down Expand Up @@ -222,6 +223,11 @@ exports[`docker > should match everything 2`] = `
"goacme/lego",
"0.0.0",
],
[
"docker",
"golangci/golangci-lint",
"0.0.0",
],
[
"docker",
"grafana/grafana-enterprise",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ exports[`docker > should match all dependencies 2`] = `
"github/ghas-jira-integration",
"1",
],
[
"githubAction",
"golangci/golangci-lint-action",
"1",
],
[
"githubAction",
"google-github-actions/auth",
Expand Down
5 changes: 5 additions & 0 deletions src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/go-telegram-bot-api/telegram-bot-api/v5",
"v1.0.0",
],
[
"golang",
"github.com/golangci/golangci-lint",
"v1.0.0",
],
[
"golang",
"github.com/hashicorp/terraform-plugin-sdk/v2",
Expand Down
13 changes: 13 additions & 0 deletions src/rules/tool/golangcilint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { register } from '../../register.js';

register({
tech: 'golangcilint',
name: 'GolangCI Lint',
type: 'tool',
files: ['.golangcit.yml'],
dependencies: [
{ type: 'golang', name: 'github.com/golangci/golangci-lint' },
{ type: 'githubAction', name: 'golangci/golangci-lint-action' },
{ type: 'docker', name: 'golangci/golangci-lint' },
],
});
1 change: 1 addition & 0 deletions src/rules/tool/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import './ansible.js';
import './apiplatform.js';
import './gitlab.js';
import './goacmelego.js';
import './golangcilint.js';
import './helm.js';
import './lighthouse.js';
import './mailhog.js';
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export type AllowedKeys =
| 'gitlab'
| 'goacmelego'
| 'golang'
| 'golangcilint'
| 'googleanalytics'
| 'grafana'
| 'hashicorp_vault'
Expand Down

0 comments on commit 57e02c3

Please sign in to comment.