trypear / pear-landing-page

Landing page for PearAI, the Open Source AI-Powered Code Editor
https://trypear.ai
19 stars 31 forks source link

Qodana code quality test and report generation in CI pipeline #81

Open anisharaz opened 1 week ago

anisharaz commented 1 week ago

we can add qodana to github action CI to test for code quality and generate a preety report on every pull request. ref. https://www.jetbrains.com/qodana/

anisharaz commented 1 week ago

if this sounds a good idea, please assign it to me. <3 @Fryingpannn

anisharaz commented 6 days ago

i wrote the configs that are required for this

qodana.yaml

version: "1.0"
profile:
  name: qodana.recommended
linter: jetbrains/qodana-js:latest
exclude:
  - name: Eslint

.github/workflows/CodeQualityTest.yml

name: Build Test
on:
  pull_request:
    types: [opened, reopened]
jobs:
  qodana_test:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      checks: write
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
          fetch-depth: 0 # a full history is required for pull request analysis
      - name: "Qodana Scan"
        uses: JetBrains/qodana-action@v2024.1
        env:
          QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
anisharaz commented 2 days ago

Ref: https://www.jetbrains.com/qodana/