Skip to content

Commit

Permalink
✨ Update qodana to 2022.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Sep 29, 2022
1 parent ab69549 commit 3a8e25f
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/[email protected].1
uses: JetBrains/[email protected].2
```
Using this workflow, Qodana will run on the main branch, release branches, and on the pull requests coming to your
Expand Down Expand Up @@ -131,7 +131,7 @@ qodana scan --show-report

```yaml
- name: Qodana Scan
uses: JetBrains/[email protected].1
uses: JetBrains/[email protected].2
with:
args: --baseline,qodana.sarif.json
```
Expand Down
2 changes: 1 addition & 1 deletion common/qodana.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// noinspection JSUnusedGlobalSymbols

export const VERSION = '2022.2.1'
export const VERSION = '2022.2.2'
export const EXECUTABLE = 'qodana'
export const FAIL_THRESHOLD_OUTPUT =
'The number of problems exceeds the failThreshold'
Expand Down
5 changes: 3 additions & 2 deletions scan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2305,7 +2305,7 @@ function getQodanaScanArgs(args, resultsDir, cacheDir) {
var VERSION, EXECUTABLE, FAIL_THRESHOLD_OUTPUT, QODANA_SARIF_NAME, QODANA_SHORT_SARIF_NAME, QodanaExitCode;
var init_qodana = __esm({
"../common/qodana.ts"() {
VERSION = "2022.2.1";
VERSION = "2022.2.2";
EXECUTABLE = "qodana";
FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold";
QODANA_SARIF_NAME = "qodana.sarif.json";
Expand Down Expand Up @@ -71513,7 +71513,8 @@ var require_utils7 = __commonJS({
}
}
return (yield exec.getExecOutput(qodana_12.EXECUTABLE, args, {
ignoreReturnCode: true
ignoreReturnCode: true,
env: Object.assign(Object.assign({}, process.env), { NONINTERACTIVE: "1" })
})).exitCode;
});
}
Expand Down
2 changes: 1 addition & 1 deletion scan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "eslint src/**/*.ts",
"package": "./node_modules/.bin/esbuild lib/main.js --platform=node --keep-names --bundle --outfile=dist/index.js",
"test": "jest",
"readme": "cp ../.github/md/github.md ../README.md && curl -sS https://raw.githubusercontent.com/JetBrains/Qodana/2022.2/topics/qodana-github-action.md >> ../README.md && cat ../.github/md/tracker.md >> ../README.md",
"readme": "cp ../.github/md/github.md ../README.md && curl -sS https://raw.githubusercontent.com/JetBrains/Qodana/2022.2/topics/github.md >> ../README.md && cat ../.github/md/tracker.md >> ../README.md",
"all": "npm install && npm run build && npm run format && npm run lint && npm run package && npm run readme"
},
"contributors": [
Expand Down
6 changes: 5 additions & 1 deletion scan/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export async function qodana(args: string[] = []): Promise<number> {
}
return (
await exec.getExecOutput(EXECUTABLE, args, {
ignoreReturnCode: true
ignoreReturnCode: true,
env: {
...process.env,
NONINTERACTIVE: '1'
}
})
).exitCode
}
Expand Down
10 changes: 5 additions & 5 deletions src/commands/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ parameters:
steps:
- restore_cache:
keys:
- qodana-{{ .Branch }}-2022.2.1-<< parameters.additional-cache-hash >>
- qodana-{{ .Branch }}-2022.2.1-
- qodana-{{ .Branch }}-2022.2.2-<< parameters.additional-cache-hash >>
- qodana-{{ .Branch }}-2022.2.2-
- qodana-{{ .Branch }}-
- qodana-
- run:
name: Qodana Scan
command: |
set -e
CLI_DIRECTORY=/tmp/cache/qodana-cli/2022.2.1
CLI_DIRECTORY=/tmp/cache/qodana-cli/2022.2.2
mkdir -p $CLI_DIRECTORY
if [[ ! -x "$CLI_DIRECTORY/qodana" ]]; then
curl -fsSL https://jb.gg/qodana-cli/install | bash -s -- \
v2022.2.1 $CLI_DIRECTORY \
v2022.2.2 $CLI_DIRECTORY \
1> /dev/null
fi
NONINTERACTIVE=1 $CLI_DIRECTORY/qodana scan \
Expand All @@ -61,7 +61,7 @@ steps:
path: << parameters.results-dir >>
destination: << parameters.artifact-name >>
- save_cache:
key: qodana-{{ .Branch }}-2022.2.1-<< parameters.additional-cache-hash >>
key: qodana-{{ .Branch }}-2022.2.2-<< parameters.additional-cache-hash >>
paths:
- << parameters.cache-dir >>
- /tmp/cache/qodana-cli/
2 changes: 1 addition & 1 deletion src/examples/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
usage:
version: 2.1
orbs:
qodana: jetbrains/[email protected].1
qodana: jetbrains/[email protected].2
jobs:
code-quality:
machine:
Expand Down
5 changes: 3 additions & 2 deletions vsts/QodanaScan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function getQodanaScanArgs(args, resultsDir, cacheDir) {
var VERSION, EXECUTABLE, FAIL_THRESHOLD_OUTPUT, QODANA_SARIF_NAME, QODANA_SHORT_SARIF_NAME, QodanaExitCode;
var init_qodana = __esm({
"../common/qodana.ts"() {
VERSION = "2022.2.1";
VERSION = "2022.2.2";
EXECUTABLE = "qodana";
FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold";
QODANA_SARIF_NAME = "qodana.sarif.json";
Expand Down Expand Up @@ -4380,7 +4380,8 @@ var require_utils2 = __commonJS({
args.push("-e", `QODANA_ENV=${env}:${qodana_12.VERSION}`);
}
return tl2.exec(qodana_12.EXECUTABLE, args, {
ignoreReturnCode: true
ignoreReturnCode: true,
env: Object.assign(Object.assign({}, process.env), { NONINTERACTIVE: "1" })
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion vsts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint src/**/*.ts",
"package": "cd QodanaScan && npm ci && cd .. && ./node_modules/.bin/esbuild lib/main.js --platform=node --bundle --outfile=QodanaScan/index.js --target=node10.4 --external:shelljs --external:azure-pipelines-task-lib",
"readme": "cp ../.github/md/azure.md README.md && curl -sS https://raw.githubusercontent.com/JetBrains/Qodana/2022.2/topics/qodana-azure-pipelines.md >> README.md && cat ../.github/md/tracker.md >> README.md",
"readme": "cp ../.github/md/azure.md README.md && curl -sS https://raw.githubusercontent.com/JetBrains/Qodana/2022.2/topics/azure-pipelines.md >> README.md && cat ../.github/md/tracker.md >> README.md",
"all": "npm install && npm run build && npm run format && npm run lint && npm run package && npm run readme",
"azure": "tfx extension create --manifests vss-extension.json",
"azure-dev": "tfx extension create --manifests vss-extension.dev.json"
Expand Down
6 changes: 5 additions & 1 deletion vsts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export async function qodana(args: string[] = []): Promise<number> {
args.push('-e', `QODANA_ENV=${env}:${VERSION}`)
}
return tl.exec(EXECUTABLE, args, {
ignoreReturnCode: true
ignoreReturnCode: true,
env: {
...process.env,
NONINTERACTIVE: '1'
}
})
}

Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana-dev",
"name": "Qodana (Dev)",
"version": "2022.2.1",
"version": "2022.2.2",
"publisher": "JetBrains",
"targets": [
{
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana",
"name": "Qodana",
"version": "2022.2.1",
"version": "2022.2.2",
"public": true,
"publisher": "JetBrains",
"targets": [
Expand Down

0 comments on commit 3a8e25f

Please sign in to comment.