Commit Graph

6 Commits

Author SHA1 Message Date
Gabriel Martinez
56e38b4151 chore(atlantis): fix linter errors (#3690)
* chore(atlantis): fix linter errors

* fix superfluous-else

* revert gitlab check

* ignore stub funcs on azuredevops_client

* remove fetch-depth

* remove fail_on_error

* fix plan_step_runner_test.go

* more lint fixes

---------

Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-12-11 19:02:16 +00:00
Rui Chen
23b373e8a6 fix: add misspell check for linting codebase (#3865)
* add misspell check

* lint: fix misspell issues

```
server/events/vcs/instrumented_client.go:46:26: `soley` is a misspelling of `solely` (misspell)
// methods and implement soley any github specific interfaces.
                         ^
server/events/project_command_context_builder.go:49:5: `Conciously` is a misspelling of `Consciously` (misspell)
	// Conciously making this global since it gets flushed periodically anyways
	   ^
server/controllers/events/gitlab_request_parser_validator.go:87:32: `noteable` is a misspelling of `notable` (misspell)
				NoteableType string `json:"noteable_type"`
				                           ^
server/controllers/events/gitlab_request_parser_validator_test.go:351:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_type": "MergeRequest",
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:359:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_id": 7,
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:467:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_type": "Commit",
     ^
server/controllers/events/gitlab_request_parser_validator_test.go:475:6: `noteable` is a misspelling of `notable` (misspell)
    "noteable_id": null,
     ^
server/events/event_parser_test.go:1012:23: `seperate` is a misspelling of `separate` (misspell)
	// If sha changes in seperate PR,
	                     ^
```

Signed-off-by: Rui Chen <rui@chenrui.dev>

* add locale setting

Signed-off-by: Rui Chen <rui@chenrui.dev>

* Revert "lint: fix misspell issues"

This reverts commit 7cc56afa8e.

* lint: fix some misspell issues

Signed-off-by: Rui Chen <rui@chenrui.dev>

---------

Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-10-16 20:17:57 +00:00
Simon Heather
9789aff2cb chore: Fix golangci-lint Configuration (#3645)
* Fix golang-ci

* Update lint workflows

* Removed required checks
2023-08-08 13:42:28 -04:00
nitrocode
17fe6d6748 rm interfacer (#2657) 2022-11-12 20:32:39 -06:00
Masayuki Morita
4b6c2f65da build(lint): use revive instead of golint (#1801)
* Use revive instead of golint

The golint was officially deprecated.
https://github.com/golang/go/issues/38968

We have been using golint via golangci-lint and golangci-lint now
recommends using revive instead of golint.
https://golangci-lint.run/usage/linters/
> golint: The repository of the linter has been archived by the owner.
> Replaced by revive.

The revive is a drop-in replacement of golint. I think switching to
revive is a reasonable choice to check the same rules for free.
https://github.com/mgechev/revive

* Fix lint errors reported by revive

The revive is almost the same as golint, but there seems to be a bit
different results.

https://app.circleci.com/pipelines/github/runatlantis/atlantis/1519/workflows/75fd7da5-1532-4ed7-ac8a-4884902818a4/jobs/8314
https://github.com/runatlantis/atlantis/runs/3565887247?check_suite_focus=true
2021-09-10 09:14:56 -07:00
Luke Kysow
2225da9c61 Switch to golangci-lint from gometalinter.
Hoping that this is more stable.
2019-02-06 16:26:46 -06:00