Skip to content

Commit

Permalink
feat: some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy committed Jul 9, 2024
1 parent 1f4a4ed commit 47b2e94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion problem-matchers.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"problemMatcher": [
{
"owner": "golangci-lint-colored-line-number",
"owner": "gno-lint-colored-line-number",
"severity": "error",
"pattern": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function installLint(versionConfig: VersionConfig, mode: InstallMod
* @returns path to installed binary of golangci-lint.
*/
export async function goInstall(versionConfig: VersionConfig): Promise<string> {
core.info(`Installing golangci-lint ${versionConfig.TargetVersion}...`)
core.info(`Installing gno-lint ${versionConfig.TargetVersion}...`)

const startedAt = Date.now()

Expand Down
10 changes: 5 additions & 5 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
cmdArgs.cwd = path.resolve(workingDirectory)
}

const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd()
const cmd = `${lintPath} lint ${addedArgs.join(` `)} ${userArgs}`.trimEnd()

core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`)

const startedAt = Date.now()
try {
const res = await execShellCommand(cmd, cmdArgs)
printOutput(res)
core.info(`golangci-lint found no issues`)
core.info(`gnoci-lint found no issues`)
} catch (exc) {
// This logging passes issues to GitHub annotations but comments can be more convenient for some users.
// TODO: support reviewdog or leaving comments by GitHub API.
Expand All @@ -273,18 +273,18 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
if (exc.code === 1) {
core.setFailed(`issues found`)
} else {
core.setFailed(`golangci-lint exit with code ${exc.code}`)
core.setFailed(`gnoci-lint exit with code ${exc.code}`)
}
}

core.info(`Ran golangci-lint in ${Date.now() - startedAt}ms`)
core.info(`Ran gnoci-lint in ${Date.now() - startedAt}ms`)
}

export async function run(): Promise<void> {
try {
const { lintPath, patchPath } = await core.group(`prepare environment`, prepareEnv)
core.addPath(path.dirname(lintPath))
await core.group(`run golangci-lint`, () => runLint(lintPath, patchPath))
await core.group(`run gnoci-lint`, () => runLint(lintPath, patchPath))
} catch (error) {
core.error(`Failed to run: ${error}, ${error.stack}`)
core.setFailed(error.message)
Expand Down

0 comments on commit 47b2e94

Please sign in to comment.