Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: # Specify your branches here
- main # The 'main' branch
# - 'releases/*' # The release branches

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write

steps:
- uses: actions/checkout@v5
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
submodules: recursive

- name: 'Qodana Scan'
uses: JetBrains/qodana-action@27de2a744479d1d731934eeaf79287575ebc5dd3 # v2025.2.1
with:
pr-mode: false

env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1941125997 }}
QODANA_ENDPOINT: 'https://qodana.cloud'
2 changes: 1 addition & 1 deletion pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
package require

import (
lo "github.com/samber/lo"
"github.com/samber/lo"
)

// NilPtr asserts that the given value is a nil pointer & returns it on success.
Expand Down
2 changes: 1 addition & 1 deletion pointer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package require_test
import (
"testing"

assert "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"github.com/zimmermanncode/go-require"
)

Expand Down
49 changes: 49 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#

#################################################################################
# WARNING: Do not store sensitive information in this file, #
# as its contents will be included in the Qodana report. #
#################################################################################
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.recommended

#Enable inspections
include:
# - name: <SomeEnabledInspectionId>
- name: CheckDependencyLicenses

#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)

# Quality gate. Will fail the CI/CD pipeline if any condition is not met
# severityThresholds - configures maximum thresholds for different problem severities
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
# Code Coverage is available in Ultimate and Ultimate Plus plans

failureConditions:
severityThresholds:
any: 0 # 15
critical: 0 # 5

# testCoverageThresholds:
# fresh: 70
# total: 50

#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-go:2025.2
Loading