Add super-linter
+ fix lint issues (#650)
* feat: bump `golangci-lint`, add `super-linter`, replace outdated linter Bump `golangci-lint` version. Add `super-linter` to lint other languages. Go linter is disabled because it's currently broken: https://github.com/github/super-linter/pull/370 Replacing `scopelint` with `exportloopref`: "[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref." Fixed formatting in `.golangci.yml` Add addtional linters: `misspell`: purely style, detects typos in comments `whitespace`: detects leading and trailing whitespace `goimports`: it's gofmt + checks unused imports * fix: lint/fix `go` files * fix: lint with `standardjs` * fix: lint/fix with `markdownlint`, make template more verbose * feat: add lint stuff to makefile * fix: `UseGitIgnore` formatting * fix: lint/fix `README.md` Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
@@ -199,7 +199,6 @@ func updateTestExpressionWorkflow(t *testing.T, tables []struct {
|
||||
in string
|
||||
out string
|
||||
}, rc *RunContext) {
|
||||
|
||||
var envs string
|
||||
keys := make([]string, 0, len(rc.Env))
|
||||
for k := range rc.Env {
|
||||
@@ -242,7 +241,6 @@ jobs:
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestRewrite(t *testing.T) {
|
||||
|
@@ -109,7 +109,6 @@ func (f *stepLogFormatter) print(b *bytes.Buffer, entry *logrus.Entry) {
|
||||
}
|
||||
|
||||
func (f *stepLogFormatter) isColored(entry *logrus.Entry) bool {
|
||||
|
||||
isColored := checkIfTerminal(entry.Logger.Out)
|
||||
|
||||
if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" {
|
||||
|
@@ -1,14 +1,14 @@
|
||||
const { spawnSync } = require('child_process')
|
||||
const spawnArguments={
|
||||
cwd: process.env['INPUT_CWD'],
|
||||
const spawnArguments = {
|
||||
cwd: process.env.INPUT_CWD,
|
||||
stdio: [
|
||||
process.stdin,
|
||||
process.stdout,
|
||||
process.stderr,
|
||||
process.stderr
|
||||
]
|
||||
}
|
||||
const child=spawnSync(
|
||||
const child = spawnSync(
|
||||
'/bin/sh',
|
||||
[ '-c' ].concat(process.env['INPUT_COMMAND']),
|
||||
['-c'].concat(process.env.INPUT_COMMAND),
|
||||
spawnArguments)
|
||||
process.exit(child.status)
|
||||
|
@@ -336,7 +336,6 @@ func (rc *RunContext) EvalBool(expr string) (bool, error) {
|
||||
!strings.Contains(part, "!")) && // but it's not negated
|
||||
interpolatedPart == "false" && // and the interpolated string is false
|
||||
(isString || previousOrNextPartIsAnOperator(i, parts)) { // and it's of type string or has an logical operator before or after
|
||||
|
||||
interpolatedPart = fmt.Sprintf("'%s'", interpolatedPart) // then we have to quote the false expression
|
||||
}
|
||||
|
||||
|
@@ -157,7 +157,6 @@ func updateTestIfWorkflow(t *testing.T, tables []struct {
|
||||
out bool
|
||||
wantErr bool
|
||||
}, rc *RunContext) {
|
||||
|
||||
var envs string
|
||||
keys := make([]string, 0, len(rc.Env))
|
||||
for k := range rc.Env {
|
||||
|
@@ -33,7 +33,7 @@ type Config struct {
|
||||
Privileged bool // use privileged mode
|
||||
UsernsMode string // user namespace to use
|
||||
ContainerArchitecture string // Desired OS/architecture platform for running containers
|
||||
UseGitIgnore bool // controls if paths in .gitignore should not be copied into container, default true
|
||||
UseGitIgnore bool // controls if paths in .gitignore should not be copied into container, default true
|
||||
}
|
||||
|
||||
type runnerImpl struct {
|
||||
|
@@ -539,7 +539,6 @@ func (sc *StepContext) runAction(actionDir string, actionPath string) common.Exe
|
||||
// Interpolate the outer inputs into the composite step with items
|
||||
exprEval := sc.NewExpressionEvaluator()
|
||||
for k, v := range stepContext.Step.With {
|
||||
|
||||
if strings.Contains(v, "inputs") {
|
||||
stepContext.Step.With[k] = exprEval.Interpolate(v)
|
||||
}
|
||||
|
Reference in New Issue
Block a user