Skip to content

Commit 5412d63

Browse files
authored
Merge pull request #424 from admin-shell-io/IgGa/Qodana
Add Qodana to GitHub Actions
2 parents 4531289 + 169ea5c commit 5412d63

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check-changed-files
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
actions: read
9+
10+
jobs:
11+
qodana:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Fetch Sources
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: ${{ github.event.pull_request.commits }}
18+
19+
- name: Get two more commits so Qodana we can identify the changes
20+
if: github.event_name == 'pull_request'
21+
run: git fetch --deepen=2
22+
23+
- name: Run Qodana inspection
24+
uses: JetBrains/qodana-action@v2024.3.4
25+
with:
26+
upload-result: true
27+
args: >
28+
--baseline,doc/qodana-baseline.sarif.json,
29+
--config,.qodana/qodana.yaml
30+
31+
# This step uploads the SARIF file to GitHub so that the code scanning feature can use it.
32+
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-that-runs-the-eslint-analysis-tool
33+
- name: Upload SARIF report to GitHub
34+
uses: github/codeql-action/upload-sarif@v3
35+
with:
36+
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json

.qodana/asciidoc-inspection.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<component name="InspectionProjectProfileManager">
2+
<profile version="1.0" is_locked="true">
3+
<!-- GrazieInspection normally has a TYPO preference -->
4+
<inspection_tool class="GrazieInspection" enabled="true" level="WARNING" enabled_by_default="true"/>
5+
<inspection_tool class="AsciiDocAnchorWithoutId" enabled="true" level="WARNING" enabled_by_default="true" />
6+
<inspection_tool class="AsciiDocAttributeContinuation" enabled="true" level="WARNING" enabled_by_default="true" />
7+
<inspection_tool class="AsciiDocBlockMacroShouldBeInlineMacro" enabled="true" level="WARNING" enabled_by_default="true" />
8+
<inspection_tool class="AsciiDocDescriptionExists" enabled="true" level="WARNING" enabled_by_default="true" />
9+
<inspection_tool class="AsciiDocDescriptionLength" enabled="true" level="WARNING" enabled_by_default="true" />
10+
<inspection_tool class="AsciiDocHeadingStyle" enabled="true" level="WARNING" enabled_by_default="true" />
11+
<inspection_tool class="AsciiDocHorizontalRule" enabled="true" level="WARNING" enabled_by_default="true" />
12+
<inspection_tool class="AsciiDocInlineMacroShouldBeBlockOrPreprocessorMacro" enabled="true" level="WARNING" enabled_by_default="true" />
13+
<inspection_tool class="AsciiDocLinkResolve" enabled="true" level="ERROR" enabled_by_default="true" />
14+
<inspection_tool class="AsciiDocListingStyle" enabled="true" level="WARNING" enabled_by_default="true" />
15+
<inspection_tool class="AsciiDocPageBreak" enabled="true" level="WARNING" enabled_by_default="true" />
16+
<inspection_tool class="AsciiDocReferencePattern" enabled="true" level="ERROR" enabled_by_default="true" />
17+
<inspection_tool class="AsciiDocXrefWithFileExtension" enabled="true" level="WARNING" enabled_by_default="true" />
18+
<inspection_tool class="AsciiDocXrefWithNaturalCrossReference" enabled="true" level="WARNING" enabled_by_default="true" />
19+
<inspection_tool class="AsciiDocAttributeShouldBeDefined" enabled="true" level="WARNING" enabled_by_default="true" />
20+
<inspection_tool class="AsciiDocObsoletePassthrough" enabled="true" level="WARNING" enabled_by_default="true" />
21+
<inspection_tool class="AsciiDocUnresolvedAntoraModule" enabled="true" level="ERROR" enabled_by_default="true" />
22+
<inspection_tool class="SpellCheckingInspection" enabled="true" level="WARNING" enabled_by_default="true">
23+
<option name="processCode" value="true" />
24+
<option name="processLiterals" value="true" />
25+
<option name="processComments" value="true" />
26+
</inspection_tool>
27+
<inspection_tool class="Style" enabled="true" level="WARNING" enabled_by_default="true" />
28+
</profile>
29+
</component>

.qodana/qodana.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 1.0
2+
profile:
3+
path: .qodana/asciidoc-inspection.xml
4+
linter: jetbrains/qodana-jvm-community:2024.3
5+
plugins:
6+
- id: org.asciidoctor.intellij.asciidoc
7+
8+
include:
9+
- name: HttpUrlsUsage
10+
- name: GrazieInspection
11+
12+
exclude:
13+
- name: All
14+
paths:
15+
- .github
16+
- .qodana
17+
- CONTRIBUTING.md
18+
- LICENSE.txt
19+
- README.md
20+
- AasxFileServerServiceSpecification
21+
- AssetAdministrationShellRegistryServiceSpecification
22+
- AssetAdministrationShellRepositoryServiceSpecification
23+
- AssetAdministrationShellServiceSpecification
24+
- ConceptDescriptionServiceSpecification
25+
- DINSPEC16593-Schemas
26+
- DiscoveryServiceSpecification
27+
- Entire-API-Collection
28+
- Part1-MetaModel-Schemas
29+
- Part2-API-Schemas
30+
- SubmodelRegistryServiceSpecification
31+
- SubmodelRepositoryServiceSpecification
32+
- SubmodelServiceSpecification

0 commit comments

Comments
 (0)