我的圈套
我想达到什么目的?
我试图运行声纳扫描仪的公关和主分支的网页应用程序编写的类型和javascript。
我面临什么问题?
ts和tsx文件被分析为PR (分支)分析,但是当分析在主分支上运行时,ts和tsx文件显示为未分析。
来自PR的代码

来自主分支分析的代码

到目前为止,我做了什么努力来达到这个目标?
主分支分析的抽样行动:
sonarqube:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v1.1.0
env:
SONAR_TOKEN: XX
SONAR_HOST_URL: XX
with:
args: >
-Dsonar.verbose=true
-Dsonar.sources=./src/
-Dsonar.tests=./test/
-Dsonar.projectKey=my_key
-Dsonar.eslint.reportPaths=./reports/eslint.json
-Dsonar.css.stylelint.reportPaths=/reports/stylelint.json
-Dsonar.javascript.lcov.reportPaths=./reports/lcov.info我们还确保了tsconfig.json具有必要的
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.css",
],不知道出了什么问题。
发布于 2022-11-02 06:54:28
该问题与useUnknownInCatchVariables选项有关,该选项在tsconfig.json中用作编译器选项。
当扫描仪在调试模式下运行时,会引发错误,因为tsx文件没有被扫描。
06:09:36.583 INFO: Using /github/workspace/./tsconfig.json from sonar.typescript.tsconfigPath property
06:09:36.744 ERROR: Unknown compiler option 'useUnknownInCatchVariables'.基于瓦伊卡尔线程,我们必须:
https://stackoverflow.com/questions/74275376
复制相似问题