mitchspano / sfdx-scan-pull-request

Runs sfdx-scanner on a pull request and generates in-line comments with the findings.
Apache License 2.0
73 stars 25 forks source link

Issue with missing tsconfig.json #47

Closed RaviVaranasi closed 1 year ago

RaviVaranasi commented 1 year ago

We made a change to jsonconfig.json. Added checkJs: true

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "checkJs": true,
    "target": "ESNext"
  },
  "include": ["**/*", "../../../../.sfdx/typings/lwc/**/*.d.ts", "../../../../types/*.d.ts"]
}

Unfortunately, it is now looking for tsconfig.json

Error: Command failed: node_modules/sfdx-cli/bin/run scanner:run     --pmdconfig="ruleset.xml"      --format json     --target "temporary"     --outfile "sfdx-scanner-findings.json"
 ›   Warning: sfdx-cli update available from 7.192.2 to 7.194.1.
WARNING: We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://research.net/r/SalesforceCA
ERROR running scanner:run:  We couldn't find 'tsconfig.json' in the current directory '/home/runner/work/salesforce-job-scope-review/salesforce-job-scope-review'. Switch to a directory that contains 'tsconfig.json' or specify the current directory with the --tsconfig flag.
mitchspano commented 1 year ago

Can you share your .yml file? it looks like you might be missing the tsconfig input variable.

mitchspano commented 1 year ago

Closing this due to inactivity