mirror of
https://github.com/Zandercraft/TechnicFlux.git
synced 2026-10-28 04:29:20 +00:00
Add Qodana code scanning
This commit is contained in:
20
.github/workflows/qodana_code_quality.yml
vendored
Normal file
20
.github/workflows/qodana_code_quality.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Qodana
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- release
|
||||
|
||||
jobs:
|
||||
qodana:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: 'Qodana Scan'
|
||||
uses: JetBrains/qodana-action@v2023.2
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
||||
2
app.js
2
app.js
@@ -30,7 +30,7 @@ app.use(function (req, res, next) {
|
||||
})
|
||||
|
||||
// error handler
|
||||
app.use(function (err, req, res, next) {
|
||||
app.use(function (err, req, res) {
|
||||
// set locals, only providing error in development
|
||||
res.locals.message = err.message
|
||||
res.locals.error = req.app.get('env') === 'development' ? err : {}
|
||||
|
||||
29
qodana.yaml
Normal file
29
qodana.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
#-------------------------------------------------------------------------------#
|
||||
# Qodana analysis is configured by qodana.yaml file #
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||
#-------------------------------------------------------------------------------#
|
||||
version: "1.0"
|
||||
|
||||
#Specify inspection profile for code analysis
|
||||
profile:
|
||||
name: qodana.starter
|
||||
|
||||
#Enable inspections
|
||||
#include:
|
||||
# - name: <SomeEnabledInspectionId>
|
||||
|
||||
#Disable inspections
|
||||
#exclude:
|
||||
# - name: <SomeDisabledInspectionId>
|
||||
# paths:
|
||||
# - <path/where/not/run/inspection>
|
||||
|
||||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||
#bootstrap: sh ./prepare-qodana.sh
|
||||
|
||||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||
#plugins:
|
||||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||
|
||||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||
linter: jetbrains/qodana-js:latest
|
||||
@@ -2,7 +2,7 @@ const express = require('express')
|
||||
const router = express.Router()
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function (req, res, next) {
|
||||
router.get('/', function (req, res) {
|
||||
res.render('index', { title: 'TechnicFlux' })
|
||||
})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ const express = require('express')
|
||||
const router = express.Router()
|
||||
|
||||
/* GET users listing. */
|
||||
router.get('/', function (req, res, next) {
|
||||
router.get('/', function (req, res) {
|
||||
res.send('respond with a resource')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user