-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* enable lint * Iteration 1 * Iteration 2
- Loading branch information
1 parent
9608bbf
commit 0034fe3
Showing
10 changed files
with
90 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
run: | ||
timeout: 15m | ||
tests: false # Exclude test files from linting | ||
|
||
# Linter options and descriptions: https://golangci-lint.run/usage/linters/ | ||
linters: | ||
enable: | ||
- errcheck | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
disable: | ||
# Disabling these two default linters for now as their checks are not a priority | ||
- gosimple | ||
- unused | ||
|
||
linters-settings: | ||
staticcheck: | ||
checks: | ||
- all | ||
- -SA1019 # Ignore pkg deprecation warnings from staticcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,47 @@ jobs: | |
artifact: binaries | ||
- publish: $(System.DefaultWorkingDirectory)/manifest | ||
artifact: manifest | ||
|
||
- job: Lint | ||
displayName: 'Lint' | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
variables: | ||
- group: moc-build | ||
- name: GO111MODULE | ||
value: 'on' | ||
|
||
steps: | ||
- task: GoTool@0 | ||
inputs: | ||
version: '1.22.5' | ||
|
||
- task: InstallSSHKey@0 | ||
inputs: | ||
knownHostsEntry: | | ||
$(KNOWN_HOST_GITHUB) | ||
$(KNOWN_HOST_GITHUB_ECDSA) | ||
$(KNOWN_HOST_GITHUB_Ed25519) | ||
sshPublicKey: '$(SSH_PUBLIC_KEY)' | ||
sshKeySecureFile: 'azure-pipelines-ssh-key-new' | ||
|
||
- task: AzureCLI@2 | ||
inputs: | ||
azureSubscription: 'kva-azuredevops-gcm' | ||
scriptType: 'bash' | ||
scriptLocation: 'inlineScript' | ||
inlineScript: | | ||
# Obtain Azure DevOps access token | ||
aadToken=$(az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv) | ||
# Set git configuration for authentication | ||
git config --global http.extraheader "AUTHORIZATION: bearer $aadToken" | ||
git config --global url."ssh://[email protected]/".insteadOf "https://github.com/" | ||
displayName: 'Set git config' | ||
|
||
- script: | | ||
make golangci-lint | ||
displayName: 'Run GolangCI-Lint' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters