-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into user/jirenugo/aks-ee
- Loading branch information
Showing
12 changed files
with
104 additions
and
20 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 |
---|---|---|
|
@@ -63,3 +63,47 @@ jobs: | |
|
||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ GOBUILD=$(GOCMD) build -v #-mod=vendor | |
GOTEST=$(GOCMD) test -v | ||
GOHOSTOS=$(strip $(shell $(GOCMD) env get GOHOSTOS)) | ||
MOCKGEN=$(shell command -v mockgen 2> /dev/null) | ||
GOPATH_BIN := $(shell go env GOPATH)/bin | ||
|
||
# Private repo workaround | ||
export GOPRIVATE = github.com/microsoft | ||
|
@@ -51,3 +52,7 @@ mocks: | |
go get github.com/golang/[email protected] | ||
go generate ./... | ||
|
||
golangci-lint: | ||
$(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
$(GOPATH_BIN)/golangci-lint run --config .golangci.yml | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/microsoft/moc | ||
|
||
go 1.22 | ||
go 1.22.4 | ||
|
||
require ( | ||
github.com/golang-jwt/jwt v3.2.2+incompatible | ||
|
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