์•ˆ๋…•ํ•˜์„ธ์š” Mambo ์ž…๋‹ˆ๋‹ค.

์˜ค๋Š˜์€ SonarQube์™€ Github Action์„ ํ†ตํ•ด ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ๊ณผ์ •์„ ์•Œ์•„๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

SonarQube

์†Œ๋‚˜ํ๋ธŒ๋Š” ๋‹ค์–‘ํ•œ ์–ธ์–ด์— ๋Œ€ํ•œ ์ฝ”๋“œ ํ’ˆ์งˆ์„ ๋ถ„์„ํ•˜๊ณ  ์ทจ์•ฝ์ ์„ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๋Š” ์ •์  ๋ถ„์„ ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. ํšŒ์‚ฌ์—์„œ ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•˜๊ณ  ์‹ถ๋‹ค๋Š” ์š”๊ตฌ์‚ฌํ•ญ์ด ์žˆ์–ด ์ œ๊ฐ€ SonarQube๋ฅผ ๋„์ž…ํ•˜๊ณ  ์›”์š”์ผ๊ณผ ๊ธˆ์š”์ผ๋งˆ๋‹ค ํ”„๋กœ์ ํŠธ ์ฝ”๋“œ์— ๋Œ€ํ•œ ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ œ๊ฐ€ ์ •์  ๋ถ„์„์„ ์œ„ํ•ด์„œ ์†Œ๋‚˜ํ๋ธŒ๋ฅผ ๋„์ž…ํ•œ ์ด์œ ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

์†Œ๋‚˜ํ๋ธŒ ๋ผ์ด์„ผ์Šค

  1. GPLv3 ๋ผ์ด์„ผ์Šค ๊ธฐ๋ฐ˜์˜ ์˜คํ”ˆ์†Œ์Šค ๋ฒ„์ „ ์ง€์›
  2. IntelliJ ๋˜๋Š” VSCode์™€ ๊ฐ™์€ IDE๋ฅผ ์œ„ํ•œ SonarLint ์ง€์›
  3. ์†Œ๋‚˜ํ๋ธŒ์— ๋Œ€ํ•œ ๊ณต์‹ ๋„์ปค ์ด๋ฏธ์ง€ ์ง€์›
  4. ๋‹ค์–‘ํ•œ ์–ธ์–ด์™€ ์ปค๋ฎค๋‹ˆํ‹ฐ ๊ธฐ๋ฐ˜์˜ ๊ทœ์น™ ์ง€์›

ํšŒ์‚ฌ ๊ฐœ๋ฐœ์ž๋“ค์ด ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ์ธํ…”๋ฆฌ์ œ์ด IDEA ๋˜๋Š” VSCode์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” SonarLint๋ฅผ ์ œ๊ณตํ•˜์—ฌ ๋ณ„๋„์˜ ์„œ๋ฒ„ ์—†์ด๋„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ž์ฒด์ ์œผ๋กœ ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•˜๊ณ  ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ๊ณต์‹ ๋„์ปค ์ด๋ฏธ์ง€๋ฅผ ํ†ตํ•ด ๋ณ„๋‹ค๋ฅธ ์„ค์ • ์—†์ด๋„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์†Œ๋‚˜ํ๋ธŒ ์‹œ์Šคํ…œ์„ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์†Œ๋‚˜ํ๋ธŒ ์‹œ์Šคํ…œ ๊ตฌ์„ฑ

์†Œ๋‚˜ํ๋ธŒ๋Š” ์ง์ ‘ ์„ค์น˜ํ•  ์ˆ˜๋„ ์žˆ์œผ๋ฉฐ ๋„์ปค ์ด๋ฏธ์ง€์™€ ํ•จ๊ป˜ ์ œ๊ณตํ•˜๋Š” ๋„์ปค ์ปดํฌ์ฆˆ ๋ฌธ์„œ๋ฅผ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

sq-with-postgres/docker-compose.yml

version: "3.8"

services:
  web:
    image: sonarqube:9.1.0-community
    restart: always
    depends_on:
      - db
    ports:
      - "9000:9000"
    networks:
      - sonarnet
    environment:
      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
      SONAR_JDBC_USERNAME: sonar
      SONAR_JDBC_PASSWORD: sonar
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
      - sonarqube_temp:/opt/sonarqube/temp
      - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
    ulimits:
      nproc: 65535
      nofile:
        soft: 262144
        hard: 262144
  db:
    image: postgres
    networks:
      - sonarnet
    environment:
      POSTGRES_USER: sonar
      POSTGRES_PASSWORD: sonar
    volumes:
      - postgresql:/var/lib/postgresql
      - postgresql_data:/var/lib/postgresql/data

networks:
  sonarnet:
    driver: bridge

volumes:
  sonarqube_data:
  sonarqube_extensions:
  sonarqube_logs:
  sonarqube_temp:
  sonarqube_bundled-plugins:
  postgresql:
  postgresql_data:

WSL vm.max_map_count

์œˆ๋„์šฐ ํ™˜๊ฒฝ์—์„œ WSL๋กœ ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฒฝ์šฐ vm.max_map_count๋กœ ์ธํ•˜์—ฌ ์†Œ๋‚˜ํ๋ธŒ์—์„œ ์‹คํ–‰ํ•˜๋Š” Elasticsearch๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ ์œˆ๋„์šฐ ํ„ฐ๋ฏธ๋„์—์„œ WSL๋กœ ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋กœ ์ ‘์† ํ›„ ๋‹ค์Œ์˜ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜์—ฌ Elasticsearch์—์„œ ์š”๊ตฌํ•˜๋Š” ์ˆ˜์น˜๋กœ ๋ณ€๊ฒฝํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

# Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

์†Œ๋‚˜ํ๋ธŒ์˜ ๊ด€๋ฆฌ์ž ๊ณ„์ •๊ณผ ์ดˆ๊ธฐ ๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” admin/admin ์ž…๋‹ˆ๋‹ค.

์†Œ๋‚˜ํ๋ธŒ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

์†Œ๋‚˜ํ๋ธŒ์— ์ ‘์†ํ•˜์˜€๋‹ค๋ฉด ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•  ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ์ €๋Š” ๊นƒํ—ˆ๋ธŒ ๋ฆฌํŒŒ์ง€ํ† ๋ฆฌ ์ด๋ฆ„์„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๋Š” ํŽธ์ž…๋‹ˆ๋‹ค.

spring5-web-example ํ”„๋กœ์ ํŠธ

๊ทธ๋ฆฌ๊ณ  ์†Œ๋‚˜ํ๋ธŒ์— ๋กœ๊ทธ์ธํ•  ์ˆ˜ ์žˆ๋Š” ํ† ํฐ์„ ๋ฐœํ–‰ํ•ฉ๋‹ˆ๋‹ค.

ํ† ํฐ ์šฉ๋„๋ฅผ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์œ„ํ•œ ์ด๋ฆ„์„ ์ง€์ •ํ•˜๋Š”๋ฐ ์ €๋Š” Github Action์—์„œ ์‚ฌ์šฉํ•  ์˜ˆ์ •์ด๋ฏ€๋กœ GITHUB_ACTION์„ ์ง€์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

์ €๋Š” ๋กœ์ปฌ ์ปดํ“จํ„ฐ์— ์†Œ๋‚˜ํ๋ธŒ๋ฅผ ์‹คํ–‰ํ•˜์˜€๊ณ  ํ•„์š”ํ• ๋•Œ๋งŒ ํฌํŠธํฌ์›Œ๋”ฉ์„ ์ˆ˜ํ–‰ํ•  ์˜ˆ์ •์ด๋ฏ€๋กœ ํ† ํฐ์„ ๊ณต๊ฐœํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. (์–ด์ฐจํ”ผ ํ•™์Šต ํ›„์— ์ง€์›€โ€ฆ)

์†Œ๋‚˜ํ๋ธŒ ๊ด€๋ จ ์ฝ”๋“œ ์ถ”๊ฐ€

์†Œ๋‚˜ํ๋ธŒ ์‹œ์Šคํ…œ์— ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ํ† ํฐ์„ ๋ฐœ๊ธ‰ํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— ์†Œ๋‚˜ํ๋ธŒ์™€ ์—ฐ๊ณ„ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ”„๋กœ์ ํŠธ ํด๋”์— ์†Œ๋‚˜ํ๋ธŒ์™€ ๊ด€๋ จ๋œ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

build.gradle

๋งŒ์•ฝ, ๊ทธ๋ž˜๋“ค์„ ํ†ตํ•ด ์†Œ๋‚˜ํ๋ธŒ์™€ ์—ฐ๋™ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด build.gradle์— SonarQube ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์ถ”๊ฐ€ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

plugins {
    id "org.sonarqube" version '3.3'
    id 'jacoco'
}

sonarqube {
  properties {
    property "sonar.projectKey", "spring5-web-example"
  }
}

sonar-project.properties

sonar-project.properties ํŒŒ์ผ์€ ์†Œ๋‚˜ํ๋ธŒ์—์„œ ์ฐธ์กฐํ•˜๊ฒŒ ๋˜๋Š” ์„ค์ • ํŒŒ์ผ์ž…๋‹ˆ๋‹ค.

sonar.projectKey=spring5-web-example
sonar.projectName=spring5-web-example
sonar.java.source=1.11
sonar.sources=src/main/java
#sonar.tests=src/main/test
sonar.java.binaries=build/classes/java/main/com/example
sonar.sourceEncoding=UTF-8
sonar.exclusions=

Github Action

SonarQube GitHub Action์€ Github Action์„ ํ†ตํ•ด ์†Œ๋‚˜ํ๋ธŒ๋กœ ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ ์ฝ”๋“œ ์ถ”๊ฐ€

.github/workflows/sonarqube.yml

on:
  # schedule:
    # - cron: '0 * * * 1'
  workflow_dispatch:

name: SonarQube Workflow
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.11
      uses: AdoptOpenJDK/install-jdk@v1
      with:
        version: '11'
        architecture: x64
        targets: 'JAVA_HOME'
    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Build with Gradle
      run: ./gradlew build -x test
    - name: Upload build artifact
      uses: actions/upload-artifact@v2
      with:
        name: build
        path: build/classes

  sonarQube:
    needs: build
    name: SonarQube
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Donwload build artifact
      uses: actions/download-artifact@v2
      with:
        name: build
        path: build/classes
    - name: SonarQube Scan
      uses: kitabisa/sonarqube-action@master
      with:
        host: ${{ secrets.SONAR_HOST }}
        login: ${{ secrets.SONAR_TOKEN }}
        projectBaseDir: '/github/workspace'

์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ ํŒŒ์ผ์„ ๊นƒํ—ˆ๋ธŒ ๋ฆฌํŒŒ์ง€ํ† ๋ฆฌ์˜ ๋ฉ”์ธ ๋˜๋Š” ๋งˆ์Šคํ„ฐ ๋ธŒ๋žœ์น˜์— ๋ฐ˜์˜ํ•˜๋ฉด ๊นƒํ—ˆ๋ธŒ์—์„œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.

์†Œ๋‚˜ํ๋ธŒ ๊ด€๋ จ ์‹œํฌ๋ฆฟ ์ƒ์„ฑ

์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋‘๊ฐ€์ง€ ์‹œํฌ๋ฆฟ์„ ๊นƒํ—ˆ๋ธŒ ๋ฆฌํŒŒ์ง€ํ† ๋ฆฌ์— ์„ค์ •ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

  • SONAR_HOST : ์†Œ๋‚˜ํ๋ธŒ ํ˜ธ์ŠคํŠธ ์ฃผ์†Œ
  • SONAR_TOKEN : ์†Œ๋‚˜ํ๋ธŒ์—์„œ ๋ฐœ๊ธ‰ํ•œ ํ† ํฐ ์ •๋ณด

์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ ์‹คํ–‰

์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ ์„ค์ •์ด ์™„๋ฃŒ๋˜์—ˆ์œผ๋ฏ€๋กœ ๋ฉ”์ธ ๋ธŒ๋žœ์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ ์ฝ”๋“œ์— ๋Œ€ํ•œ ๋นŒ๋“œ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์ˆ˜ํ–‰๋˜๊ณ  ์†Œ๋‚˜ํ๋ธŒ ์„œ๋ฒ„๋ฅผ ํ†ตํ•ด ์ •์  ๋ถ„์„์„ ์ˆ˜ํ–‰๋˜์—ˆ๋‹ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์›Œํฌํ”Œ๋กœ์šฐ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์™„๋ฃŒ๋ฉ๋‹ˆ๋‹ค.

์ •์  ๋ถ„์„ ๊ฒฐ๊ณผ

์†Œ๋‚˜ํ๋ธŒ ์‹œ์Šคํ…œ์— ์ ‘์†ํ•˜์—ฌ ์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์‹คํ–‰ํ•œ ํ”„๋กœ์ ํŠธ์˜ ์ •์  ๋ถ„์„ ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

๋นŒ๋“œ ํ…Œ์ŠคํŠธ๋Š” ์ˆ˜ํ–‰ํ•˜์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์— ์ฝ”๋“œ ์ปค๋ฒ„๋ฆฌ์ง€๋Š” ๋ถ„์„ํ•  ์ˆ˜ ์—†์—ˆ์œผ๋‚˜ 10๊ฐœ์˜ ์ฝ”๋“œ ์•…์ทจ๊ฐ€ ๋ฐœ๊ฒฌ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ฝ”๋“œ ์•…์ทจ ๊ฒ€ํ†  ๋ฐ ๊ฐœ์„ 

์ •์  ๋ถ„์„ ๊ฒฐ๊ณผ๋กœ ๊ฒ€์ถœ๋œ ์ฝ”๋“œ ์•…์ทจ์— ๋Œ€ํ•œ ๋‚ด์šฉ์„ ๊ฒ€ํ† ํ•˜๊ณ  ์ด๋ฅผ ๊ฐœ์„ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

์ฝ”๋“œ ์•…์ทจ

์ฒซ๋ฒˆ์งธ ๊ฒ€์ถœ ํ•ญ๋ชฉ์€ ์—ฐ์†๋œ ๋ผ์ธ์„ ์ฃผ์„์œผ๋กœ ์ฒ˜๋ฆฌํ•œ ๋ถ€๋ถ„์„ ์ œ๊ฑฐํ•ด์•ผํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋งŒ์•ฝ, ์ด๋ ‡๊ฒŒ ์ฃผ์„๋˜์–ด์žˆ๋Š” ๊ฒƒ์ด ๋‚จ์•„์žˆ์–ด์•ผ ํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ๊ฒ€์ถœ ๊ทœ์น™์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

# Ignore Rules
sonar.issue.ignore.multicriteria=e1,e2
sonar.issue.ignore.multicriteria.e1.ruleKey=java:S125
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*.java
sonar.issue.ignore.multicriteria.e2.ruleKey=java:S1192
sonar.issue.ignore.multicriteria.e2.resourceKey=**/*.java

java:S125๋Š” ๋ธ”๋ก์œผ๋กœ ๋œ ์ฃผ์„์„ ๋‚จ๊ธฐ๊ณ  ์žˆ๋‹ค๋Š” ์•…์ทจ์ด๋ฉฐ java:S1192๋Š” ๋™์ผํ•œ ๋ฌธ์ž์—ด์„ ์ƒ์ˆ˜๋กœ ์ทจ๊ธ‰ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ์•…์ทจ์ž…๋‹ˆ๋‹ค. ์ €๋Š” ์ด๊ฒƒ์„ ์•…์ทจ๋กœ ๋ณด์ง€ ์•Š๊ธฐ ์œ„ํ•ด์„œ ์œ„์™€ ๊ฐ™์ด ์„ค์ •ํ•˜๊ณ  ์†Œ๋‚˜ํ๋ธŒ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ๋‹ค์‹œ ์ˆ˜ํ–‰ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ธฐ์กด์— ๊ฒ€์ถœ๋˜์—ˆ๋˜ ์ฝ”๋“œ ์•…์ทจ ์ค‘ java:S125์™€ java:S1192์— ํ•ด๋‹นํ•˜๋Š” ๋ถ€๋ถ„์ด ์ œ์™ธ๋˜์–ด 3๊ฐœ์˜ ์ฝ”๋“œ ์•…์ทจ๊ฐ€ ์ค„์–ด๋“ค์—ˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํšŒ์‚ฌ ๋˜๋Š” ๊ฐœ๋ฐœํŒ€์—์„œ ํ”„๋กœ์ ํŠธ ์ฝ”๋“œ์— ๋Œ€ํ•œ ๊ทœ์น™์„ ๊ฒ€ํ† ํ•˜๋Š” ๊ณผ์ •์„ ๊ฑฐ์ณ์•ผํ•ฉ๋‹ˆ๋‹ค๋งŒ ์ €ํฌ ํšŒ์‚ฌ๋Š” ์ •์ž‘ ๊ทธ๋Ÿฌ์ง€ ์•Š๊ณ  ์žˆ์–ด ์•„์‰ฌ์›€์ด ๋งŽ์Šต๋‹ˆ๋‹ค. ์ฒด๊ณ„๊ฐ€ ์—†๋‹ค๋ณด๋‹ˆ ๋ฌด์–ธ๊ฐ€ ๋„์ž…์„ ์›ํ•˜์ง€๋งŒ ์‹ค์ œ๋กœ๋Š” ์ œ๋Œ€๋กœ ํ™œ์šฉํ•˜์ง€ ์•Š๋Š”๊ฒŒ ๋งŽ์€ ๊ฒƒ ๊ฐ™์•„์š”.

์•„๋ฌดํŠผ ๋‚˜๋จธ์ง€ ์ฝ”๋“œ ์•…์ทจ์— ๋Œ€ํ•ด์„œ๋„ ๋ฆฌํŒฉํ† ๋ง์„ ์ˆ˜ํ–‰ํ•˜์—ฌ ์—†์• ๋ณด๋„๋ก ํ•˜๋ฉด์„œ ๋งˆ์น˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@SuppressWarnings

sonar-project.properties์—์„œ ์ œ์™ธ๋˜๋„๋ก ์ •์˜ํ•œ ๊ทœ์น™์ด ํŒจํ„ด์— ์˜ํ•œ ๊ฒƒ์ด๋ผ๋ฉด ํŠน์ • ํด๋ž˜์Šค ๋˜๋Š” ํ•จ์ˆ˜ ๋‹จ์œ„๋กœ ๊ทœ์น™์„ ์ œ์™ธํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ @SuppressWarnings์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

@SuppressWarnings({"squid:S125","squid:S1192"})
@Configuration
public class SecurityConfig {}

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.