Skip to content

Commit

Permalink
⚡ Update qodana to 2022.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Dec 8, 2022
1 parent 908d98e commit 3fdeefa
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2022.2.4
uses: JetBrains/qodana-action@v2022.3.0
```

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/qodana-action@v2022.2.4
uses: JetBrains/qodana-action@v2022.3.0
with:
args: --baseline,qodana.sarif.json
```
Expand Down
14 changes: 7 additions & 7 deletions common/qodana.ts
Expand Up @@ -9,22 +9,22 @@ export const FAIL_THRESHOLD_OUTPUT =
'The number of problems exceeds the failThreshold'
export const QODANA_SARIF_NAME = 'qodana.sarif.json'
export const QODANA_SHORT_SARIF_NAME = 'qodana-short.sarif.json'
export const VERSION = '2022.2.4'
export const VERSION = '2022.3.0'
export const EXECUTABLE = 'qodana'
export function getQodanaSha256(arch: string, platform: string): string {
switch (`${platform}_${arch}`) {
case 'windows_x86_64':
return '343c7a5e16263ffff12933b96cb6647af338faf3e001b5b66e90b225cd81755b'
return '29ad4104e62766bf3445ba3940a625843a19a71cfefbf3ebda1f71372d7ec937'
case 'windows_arm64':
return '77f2918fb97930384f08521bd051b103a5d1852e6b72bddf5f0244d7fa12698c'
return '44ea5d3b8853556491188e98fa31518c5e74f2a4d04c4e9dd449e829096759f5'
case 'linux_x86_64':
return '7f0e89e882ffe036aea025c6e7849049bbaac41b1f8ff0f55e20b6bd68ce6164'
return '6e92fa152d2bd2d18689920df0fba7d7aa5a94295089cede8eec054cd78b851c'
case 'linux_arm64':
return 'b400cf6f8c2e39fd5cad6954be695dc46bf6070ce342a96ab46101bed0a1adaa'
return '558508bd593c1a6027ec17d3feff338eb12e8c44e72890072405300f47b72ee5'
case 'darwin_x86_64':
return 'f18e55335270e612cf2ef9e33d854cfc86c31b76c4ccc881b8d8b5819cedbc69'
return 'ebdf550347d3c0fa84eee09d4a063237006a0034b5391340d034124bc5591cfc'
case 'darwin_arm64':
return 'f69c832feb2c223bfa209fc38262e8559e049dca48ca7b387f7aa19b8fa6d637'
return '9c8baca0796a3cbb1a743f716bde6c90d5a38f85348f54d8eb08e62084b1b0a1'
default:
throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`)
}
Expand Down
21 changes: 14 additions & 7 deletions scan/__tests__/main.test.ts
Expand Up @@ -153,15 +153,22 @@ test('check whether Azure Pipelines README.md has the latest major version menti

test('check whether CircleCI orb definition contains the latest version', () => {
const orb = path.join(__dirname, '..', '..', 'src', 'commands', 'scan.yml')
const example = path.join(__dirname, '..', '..', 'src', 'examples', 'scan.yml')
const example = path.join(
__dirname,
'..',
'..',
'src',
'examples',
'scan.yml'
)
for (const orbFile of [orb, example]) {
const orbFileContent = fs.readFileSync(orbFile, 'utf8')
const mentions = orbFileContent.match(/\d+\.\d+\.\d+/g) || []
expect(mentions.length > 0).toEqual(true)
for (const mention of mentions) {
expect(mention).toEqual(VERSION)
}
const orbFileContent = fs.readFileSync(orbFile, 'utf8')
const mentions = orbFileContent.match(/\d+\.\d+\.\d+/g) || []
expect(mentions.length > 0).toEqual(true)
for (const mention of mentions) {
expect(mention).toEqual(VERSION)
}
}
})

test('download all Qodana CLI archives and check their checksums', async () => {
Expand Down
14 changes: 7 additions & 7 deletions scan/dist/index.js
Expand Up @@ -2796,17 +2796,17 @@ __export(qodana_exports, {
function getQodanaSha256(arch, platform) {
switch (`${platform}_${arch}`) {
case "windows_x86_64":
return "343c7a5e16263ffff12933b96cb6647af338faf3e001b5b66e90b225cd81755b";
return "29ad4104e62766bf3445ba3940a625843a19a71cfefbf3ebda1f71372d7ec937";
case "windows_arm64":
return "77f2918fb97930384f08521bd051b103a5d1852e6b72bddf5f0244d7fa12698c";
return "44ea5d3b8853556491188e98fa31518c5e74f2a4d04c4e9dd449e829096759f5";
case "linux_x86_64":
return "7f0e89e882ffe036aea025c6e7849049bbaac41b1f8ff0f55e20b6bd68ce6164";
return "6e92fa152d2bd2d18689920df0fba7d7aa5a94295089cede8eec054cd78b851c";
case "linux_arm64":
return "b400cf6f8c2e39fd5cad6954be695dc46bf6070ce342a96ab46101bed0a1adaa";
return "558508bd593c1a6027ec17d3feff338eb12e8c44e72890072405300f47b72ee5";
case "darwin_x86_64":
return "f18e55335270e612cf2ef9e33d854cfc86c31b76c4ccc881b8d8b5819cedbc69";
return "ebdf550347d3c0fa84eee09d4a063237006a0034b5391340d034124bc5591cfc";
case "darwin_arm64":
return "f69c832feb2c223bfa209fc38262e8559e049dca48ca7b387f7aa19b8fa6d637";
return "9c8baca0796a3cbb1a743f716bde6c90d5a38f85348f54d8eb08e62084b1b0a1";
default:
throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`);
}
Expand Down Expand Up @@ -2884,7 +2884,7 @@ var init_qodana = __esm({
FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold";
QODANA_SARIF_NAME = "qodana.sarif.json";
QODANA_SHORT_SARIF_NAME = "qodana-short.sarif.json";
VERSION = "2022.2.4";
VERSION = "2022.3.0";
EXECUTABLE = "qodana";
__name(getQodanaSha256, "getQodanaSha256");
__name(getProcessArchName, "getProcessArchName");
Expand Down
12 changes: 6 additions & 6 deletions src/commands/scan.yml
Expand Up @@ -38,20 +38,20 @@ parameters:
steps:
- restore_cache:
keys:
- qodana-{{ .Branch }}-2022.2.4-<< parameters.additional-cache-hash >>
- qodana-{{ .Branch }}-2022.2.4-
- qodana-{{ .Branch }}-2022.3.0-<< parameters.additional-cache-hash >>
- qodana-{{ .Branch }}-2022.3.0-
- qodana-{{ .Branch }}-
- qodana-
- run:
name: Qodana Scan
command: |
set -e
QODANA_SHA_256=8e087bf01fcd79a2cdcd4f2663e93a73e6a0de2a6fb1985e028f0b28384504c7
CLI_DIRECTORY=/tmp/cache/qodana-cli/2022.2.4
QODANA_SHA_256=4e2128054a6c5a3206c707a7e6b30f4a96cce6d21a3b3196d7038db229a23c89
CLI_DIRECTORY=/tmp/cache/qodana-cli/2022.3.0
mkdir -p $CLI_DIRECTORY
if [[ ! -x "$CLI_DIRECTORY/qodana" ]]; then
curl -fsSL https://jb.gg/qodana-cli/install | bash -s -- \
v2022.2.4 $CLI_DIRECTORY \
v2022.3.0 $CLI_DIRECTORY \
1> /dev/null
fi
echo "$QODANA_SHA_256 $CLI_DIRECTORY/qodana" | sha256sum -c
Expand All @@ -63,7 +63,7 @@ steps:
path: << parameters.results-dir >>
destination: << parameters.artifact-name >>
- save_cache:
key: qodana-{{ .Branch }}-2022.2.4-<< parameters.additional-cache-hash >>
key: qodana-{{ .Branch }}-2022.3.0-<< parameters.additional-cache-hash >>
paths:
- << parameters.cache-dir >>
- /tmp/cache/qodana-cli/
2 changes: 1 addition & 1 deletion src/examples/scan.yml
Expand Up @@ -3,7 +3,7 @@ description: >
usage:
version: 2.1
orbs:
qodana: jetbrains/qodana@2022.2.4
qodana: jetbrains/qodana@2022.3.0
jobs:
code-quality:
machine:
Expand Down
14 changes: 7 additions & 7 deletions vsts/QodanaScan/index.js
Expand Up @@ -53,17 +53,17 @@ __export(qodana_exports, {
function getQodanaSha256(arch, platform) {
switch (`${platform}_${arch}`) {
case "windows_x86_64":
return "343c7a5e16263ffff12933b96cb6647af338faf3e001b5b66e90b225cd81755b";
return "29ad4104e62766bf3445ba3940a625843a19a71cfefbf3ebda1f71372d7ec937";
case "windows_arm64":
return "77f2918fb97930384f08521bd051b103a5d1852e6b72bddf5f0244d7fa12698c";
return "44ea5d3b8853556491188e98fa31518c5e74f2a4d04c4e9dd449e829096759f5";
case "linux_x86_64":
return "7f0e89e882ffe036aea025c6e7849049bbaac41b1f8ff0f55e20b6bd68ce6164";
return "6e92fa152d2bd2d18689920df0fba7d7aa5a94295089cede8eec054cd78b851c";
case "linux_arm64":
return "b400cf6f8c2e39fd5cad6954be695dc46bf6070ce342a96ab46101bed0a1adaa";
return "558508bd593c1a6027ec17d3feff338eb12e8c44e72890072405300f47b72ee5";
case "darwin_x86_64":
return "f18e55335270e612cf2ef9e33d854cfc86c31b76c4ccc881b8d8b5819cedbc69";
return "ebdf550347d3c0fa84eee09d4a063237006a0034b5391340d034124bc5591cfc";
case "darwin_arm64":
return "f69c832feb2c223bfa209fc38262e8559e049dca48ca7b387f7aa19b8fa6d637";
return "9c8baca0796a3cbb1a743f716bde6c90d5a38f85348f54d8eb08e62084b1b0a1";
default:
throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`);
}
Expand Down Expand Up @@ -141,7 +141,7 @@ var init_qodana = __esm({
FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold";
QODANA_SARIF_NAME = "qodana.sarif.json";
QODANA_SHORT_SARIF_NAME = "qodana-short.sarif.json";
VERSION = "2022.2.4";
VERSION = "2022.3.0";
EXECUTABLE = "qodana";
QodanaExitCode = /* @__PURE__ */ ((QodanaExitCode2) => {
QodanaExitCode2[QodanaExitCode2["Success"] = 0] = "Success";
Expand Down
4 changes: 2 additions & 2 deletions vsts/QodanaScan/task.json
Expand Up @@ -9,8 +9,8 @@
"author": "JetBrains",
"version": {
"Major": 2022,
"Minor": 2,
"Patch": 4
"Minor": 3,
"Patch": 0
},
"demands": ["RemoteDockerServerOS -equals linux"],
"instanceNameFormat": "Qodana Scan",
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.dev.json
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana-dev",
"name": "Qodana (Dev)",
"version": "2022.2.4",
"version": "2022.3.0",
"publisher": "JetBrains",
"targets": [
{
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.json
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana",
"name": "Qodana",
"version": "2022.2.4",
"version": "2022.3.0",
"public": true,
"publisher": "JetBrains",
"targets": [
Expand Down

0 comments on commit 3fdeefa

Please sign in to comment.