Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI build of PR is throwing error on Lint issue which isn't in adherence with lint convention of repo #7886

Closed
SachinShekhar opened this issue May 9, 2020 · 1 comment
Labels
needs-triage This issue or PR still needs to be triaged.

Comments

@SachinShekhar
Copy link
Contributor

SachinShekhar commented May 9, 2020

On my recent PR, CI build is throwing these errors:

@aws-cdk/aws-appsync: /codebuild/output/src548895071/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts
@aws-cdk/aws-appsync:   294:56   error  Missing trailing comma                          comma-dangle
@aws-cdk/aws-appsync:   295:10   error  Missing trailing comma                          comma-dangle
@aws-cdk/aws-appsync:   315:1    error  Expected indentation of 12 spaces but found 14  @typescript-eslint/indent

First, why is build checking linting issues? I thought there was already a lint bot acting on PRs.

Second, if you look at tslint.yaml file in this repo, you'll find this:

# Trailing comma gets into a fight with itself when splitting lists over multiple lines
    trailing-comma: false

Why this conflicting behavior? Please, choose one.

@SachinShekhar SachinShekhar added the needs-triage This issue or PR still needs to be triaged. label May 9, 2020
@shivlaks
Copy link
Contributor

shivlaks commented May 9, 2020

@SachinShekhar - we run several linters during build. As mentioned in our CONTRIBUTING guide, we're in the midst of moving over to using eslint.

Learn more about the deprecation of TSLint

The PR linter GitHub actions do not cover the scenarios linked above. They're evaluated as part of the PR build.

The rule you're running into comes from here

Based on your stack trace from the build you've linked, you should be able to run the failing command that ended with error code 1 again with --fix to fix your files up.

aws-cdk/aws-appsync: ✖ 26 problems (26 errors, 0 warnings)
@aws-cdk/aws-appsync:   26 errors and 0 warnings potentially fixable with the `--fix` option.
@aws-cdk/aws-appsync: Error: /codebuild/output/src548895071/src/github.com/aws/aws-cdk/node_modules/eslint/bin/eslint.js . --ext=.ts --resolve-plugins-relative-to=/codebuild/output/src548895071/src/github.com/aws/aws-cdk/tools/cdk-build-tools/lib exited with error code 1
@aws-cdk/aws-appsync: Build failed. ${timers.display()}
@aws-cdk/aws-appsync: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Hopefully that answers all your questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants