>

소나의 python 플러그인과 jenkins 작업에서 pylint를 사용하려고합니다. 그러나 내 pylint 결과가 생성되어 작업 영역에서 사용 가능하더라도 소나가이를 가져 오지 않습니다.

쉘 단계 실행:파일 린트 보고서 파일 생성

cd $WORKSPACE
export TERM="linux"
pylint --rcfile=.pylintrc $(find . -iname "*.py" -print) -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint-report.txt || exit 0

SonarQube 스캐너 실행:프로젝트 스캔 및 소나 서버로 전송

sonar.projectKey=python:python-project
sonar.projectName=python-project
sonar.projectVersion=dev
sonar.projectDescription=python project
sonar.language=py
sonar.projectBaseDir=$WORKSPACE
sonar.sources=$WORKSPACE
sonar.python.pylint.reportPath=pylint-report.txt
sonar.python.pylint=/bin/pylint
sonar.python.pylint_config=.pylintrc
sonar.exclusions=**/venv/**
sonar.sourceEncoding=UTF-8

이 작업은 성공하고 데이터는 소나로 채워지지만 필 린트 데이터는 보이지 않습니다. 작업에서 사용하는 것과 동일한 플래그를 사용하여 작업 공간에서 직접 소나 스캐너를 수동으로 실행하려고 시도했지만 (플러스 사용 가능) pylint 보고서 파일을 찾지 못하는 경우도 있습니다.

09:08:42.040 INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
09:08:42.044 INFO: Project root configuration file: /var/lib/jenkins/workspace/redacted-sonar/sonar-project.properties
09:08:42.066 INFO: SonarQube Scanner 2.8
09:08:42.066 INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
09:08:42.066 INFO: Linux 3.10.0-514.6.1.el7.x86_64 amd64
09:08:42.262 DEBUG: keyStore is :
09:08:42.262 DEBUG: keyStore type is : jks
09:08:42.262 DEBUG: keyStore provider is :
09:08:42.262 DEBUG: init keystore
09:08:42.263 DEBUG: init keymanager of type SunX509
09:08:42.332 INFO: User cache: /root/.sonar/cache
09:08:42.332 DEBUG: Extract sonar-scanner-api-batch in temp...
09:08:42.339 DEBUG: Get bootstrap index...
09:08:42.340 DEBUG: Download: http://redacted.com/batch_bootstrap/index
09:08:42.401 DEBUG: Get bootstrap completed
09:08:42.402 DEBUG: Create isolated classloader...
09:08:42.417 DEBUG: Start temp cleaning...
09:08:42.429 DEBUG: Temp cleaning done
09:08:42.429 DEBUG: Execution getVersion
09:08:42.433 DEBUG: Execution start
09:08:42.637 DEBUG: Publish global mode
09:08:42.741 INFO: Load global repositories
09:08:42.813 DEBUG: GET 200 http://redacted.com/batch/global | time=68ms
09:08:42.872 INFO: Load global repositories (done) | time=132ms
09:08:42.888 INFO: User cache: /root/.sonar/cache
09:08:43.094 INFO: Load plugins index
09:08:43.100 DEBUG: GET 200 http://redacted.com/deploy/plugins/index.txt | time=5ms
09:08:43.100 INFO: Load plugins index (done) | time=6ms
09:08:43.101 DEBUG: Load plugins
09:08:43.113 DEBUG: Load plugins (done) | time=12ms
09:08:43.123 DEBUG: API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
09:08:43.201 DEBUG: Plugins:
09:08:43.201 DEBUG:   * Python 1.7.0.1195 (python)
09:08:43.201 DEBUG:   * CSS / SCSS / Less 3.1 (css)
09:08:43.201 DEBUG:   * Web 2.5.0.476 (web)
09:08:43.201 DEBUG:   * Git 1.2 (scmgit)
09:08:43.201 DEBUG:   * JSON 2.2 (JSON)
09:08:43.201 DEBUG:   * SonarJS 2.20.0.4207 (javascript)
09:08:43.219 DEBUG: Execution getVersion
09:08:43.219 INFO: SonarQube server 6.2
09:08:43.220 INFO: Default locale: "en_US", source code encoding: "UTF-8"
09:08:43.220 DEBUG: Work directory: /var/lib/jenkins/workspace/redacted-sonar/.sonar
09:08:43.220 DEBUG: Execution getVersion
09:08:43.221 DEBUG: Execution execute
09:08:43.491 INFO: Process project properties
09:08:43.493 DEBUG: Process project properties (done) | time=2ms
09:08:43.622 INFO: Load project repositories
09:08:43.640 DEBUG: GET 200 http://redacted.com/batch/project.protobuf?key=redacted%3Aredacted | time=17ms
09:08:43.707 INFO: Load project repositories (done) | time=85ms
09:08:43.775 DEBUG: Available languages:
09:08:43.775 DEBUG:   * Python => "py"
09:08:43.775 DEBUG:   * CSS => "css"
09:08:43.775 DEBUG:   * SCSS => "scss"
09:08:43.775 DEBUG:   * Less => "less"
09:08:43.775 DEBUG:   * Web => "web"
09:08:43.775 DEBUG:   * JSON => "json"
09:08:43.775 DEBUG:   * JavaScript => "js"
09:08:43.779 INFO: Load quality profiles
09:08:43.799 DEBUG: GET 200 http://redacted.com/api/qualityprofiles/search.protobuf?projectKey=redacted%3Aredacted | time=20ms
09:08:43.804 INFO: Load quality profiles (done) | time=25ms
09:08:43.810 INFO: Load active rules
09:08:43.853 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=css-sonarqube-way-71134&p=1&ps=500 | time=43ms
09:08:43.938 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=js-sonar-way-27675&p=1&ps=500 | time=46ms
09:08:43.961 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=json-sonarqube-way-96571&p=1&ps=500 | time=19ms
09:08:44.005 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=less-sonarqube-way-34273&p=1&ps=500 | time=43ms
09:08:44.039 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=py-sonar-way-66789&p=1&ps=500 | time=28ms
09:08:44.090 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=scss-sonarqube-way-58162&p=1&ps=500 | time=49ms
09:08:44.114 DEBUG: GET 200 http://redacted.com/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=web-sonar-way-97604&p=1&ps=500 | time=20ms
09:08:44.125 INFO: Load active rules (done) | time=315ms
09:08:44.160 INFO: Publish mode
09:08:44.160 DEBUG: Start recursive analysis of project modules
09:08:44.161 INFO: -------------  Scan redacted
09:08:44.250 INFO: Language is forced to py
09:08:44.259 INFO: Load server rules
09:08:44.375 DEBUG: GET 200 http://redacted.com/api/rules/list.protobuf | time=116ms
09:08:44.384 INFO: Load server rules (done) | time=125ms
09:08:44.433 DEBUG: Initializers : GenericCoverageSensor
09:08:44.434 INFO: Initializer GenericCoverageSensor
09:08:44.434 INFO: Initializer GenericCoverageSensor (done) | time=0ms
09:08:44.434 INFO: Base dir: /var/lib/jenkins/workspace/redacted-sonar
09:08:44.434 INFO: Working dir: /var/lib/jenkins/workspace/redacted-sonar/.sonar
09:08:44.436 INFO: Source paths: .
09:08:44.436 INFO: Source encoding: UTF-8, default locale: en_US
09:08:44.436 INFO: Index files
09:08:44.439 INFO: Excluded sources:
09:08:44.439 INFO:   **/flask/**
09:08:44.441 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
09:08:44.441 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : **/*.css
09:08:44.441 DEBUG: Declared extensions of language SCSS were converted to sonar.lang.patterns.scss : **/*.scss
09:08:44.441 DEBUG: Declared extensions of language Less were converted to sonar.lang.patterns.less : **/*.less
09:08:44.441 DEBUG: Declared extensions of language Web were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.rhtml,**/*.shtml
09:08:44.441 DEBUG: Declared extensions of language JSON were converted to sonar.lang.patterns.json : **/*.json
09:08:44.442 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js
09:08:44.446 DEBUG: Language of file 'app/__init__.py' is detected to be 'py'
09:08:44.446 DEBUG: Language of file 'app/app.py' is detected to be 'py'
09:08:44.447 DEBUG: Language of file 'checks_queue_runner.py' is detected to be 'py'
09:08:44.457 DEBUG: Language of file 'clear_queue.py' is detected to be 'py'
09:08:44.457 DEBUG: Language of file 'config.py' is detected to be 'py'
09:08:44.459 DEBUG: Language of file 'delete_queue_runner.py' is detected to be 'py'
09:08:44.468 DEBUG: Language of file 'get_auth_token.py' is detected to be 'py'
09:08:44.470 DEBUG: Language of file 'osclient.py' is detected to be 'py'
09:08:44.471 DEBUG: Language of file 'queue_runner.py' is detected to be 'py'
09:08:44.477 DEBUG: Language of file 'run.py' is detected to be 'py'
09:08:44.478 DEBUG: Language of file 'tq.py' is detected to be 'py'
09:08:44.490 INFO: 11 files indexed
09:08:44.492 INFO: 0 files ignored because of inclusion/exclusion patterns
09:08:44.507 INFO: Quality profile for py: Sonar way
09:08:44.519 DEBUG: Code colorizer, supported languages:
09:08:45.813 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
09:08:45.813 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
09:08:45.814 DEBUG: 'CSS Analyzer Sensor' skipped because there is no related file in current project
09:08:45.814 DEBUG: 'SCSS Analyzer Sensor' skipped because there is no related file in current project
09:08:45.815 DEBUG: 'Less Analyzer Sensor' skipped because there is no related file in current project
09:08:45.815 DEBUG: 'Web' skipped because there is no related file in current project
09:08:45.815 DEBUG: 'JSON Squid Sensor' skipped because there is no related file in current project
09:08:45.815 DEBUG: 'JavaScript Squid Sensor' skipped because there is no related file in current project
09:08:45.820 DEBUG: Sensors : Lines Sensor -> PythonXUnitSensor -> SCM Sensor -> Python Squid Sensor -> Embedded CSS Analyzer Sensor -> Zero Coverage Sensor -> Code Colorizer Sensor -> CPD Block Indexer
09:08:45.820 INFO: Sensor Lines Sensor
09:08:45.830 INFO: Sensor Lines Sensor (done) | time=10ms
09:08:45.830 INFO: Sensor PythonXUnitSensor
09:08:45.830 DEBUG: Using pattern 'xunit-reports/xunit-result-*.xml' to find reports
09:08:45.842 DEBUG: No report was found for sonar.python.xunit.reportPath using default pattern xunit-reports/xunit-result-*.xml
09:08:45.842 INFO: Sensor PythonXUnitSensor (done) | time=12ms
09:08:45.842 INFO: Sensor SCM Sensor
09:08:45.850 INFO: Sensor SCM Sensor (done) | time=8ms
09:08:45.851 INFO: Sensor Python Squid Sensor
09:08:46.315 INFO: Python unit test coverage
09:08:46.315 DEBUG: Using pattern 'coverage-reports/coverage-*.xml' to find reports
09:08:46.317 DEBUG: No report was found for sonar.python.coverage.reportPath using default pattern coverage-reports/coverage-*.xml
09:08:46.318 INFO: Python integration test coverage
09:08:46.318 DEBUG: Using pattern 'coverage-reports/it-coverage-*.xml' to find reports
09:08:46.319 DEBUG: No report was found for sonar.python.coverage.itReportPath using default pattern coverage-reports/it-coverage-*.xml
09:08:46.319 INFO: Python overall test coverage
09:08:46.319 DEBUG: Using pattern 'coverage-reports/overall-coverage-*.xml' to find reports
09:08:46.321 DEBUG: No report was found for sonar.python.coverage.overallReportPath using default pattern coverage-reports/overall-coverage-*.xml
09:08:46.321 INFO: Sensor Python Squid Sensor (done) | time=470ms
09:08:46.321 INFO: Sensor Embedded CSS Analyzer Sensor
09:08:46.382 INFO: 0 source files to be analyzed
09:08:46.383 INFO: Sensor Embedded CSS Analyzer Sensor (done) | time=62ms
09:08:46.383 INFO: Sensor Zero Coverage Sensor
09:08:46.387 INFO: 0/0 source files have been analyzed
09:08:46.399 INFO: Sensor Zero Coverage Sensor (done) | time=16ms
09:08:46.399 INFO: Sensor Code Colorizer Sensor
09:08:46.400 INFO: Sensor Code Colorizer Sensor (done) | time=1ms
09:08:46.400 INFO: Sensor CPD Block Indexer
09:08:46.400 INFO: DefaultCpdBlockIndexer is used for py
09:08:46.402 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/app/__init__.py
09:08:46.405 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/app/app.py
09:08:46.429 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/checks_queue_runner.py
09:08:46.431 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/clear_queue.py
09:08:46.432 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/config.py
09:08:46.434 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/delete_queue_runner.py
09:08:46.440 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/get_auth_token.py
09:08:46.442 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/osclient.py
09:08:46.446 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/queue_runner.py
09:08:46.449 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/run.py
09:08:46.450 DEBUG: Populating index from /var/lib/jenkins/workspace/redacted-sonar/tq.py
09:08:46.451 INFO: Sensor CPD Block Indexer (done) | time=51ms
09:08:46.456 INFO: Calculating CPD for 9 files
09:08:46.457 DEBUG: Detection of duplications for redacted:redacted:config.py
09:08:46.464 DEBUG: Detection of duplications for redacted:redacted:tq.py
09:08:46.465 DEBUG: Detection of duplications for redacted:redacted:checks_queue_runner.py
09:08:46.471 DEBUG: Detection of duplications for redacted:redacted:queue_runner.py
09:08:46.474 DEBUG: Detection of duplications for redacted:redacted:app/app.py
09:08:46.476 DEBUG: Detection of duplications for redacted:redacted:osclient.py
09:08:46.477 DEBUG: Detection of duplications for redacted:redacted:clear_queue.py
09:08:46.478 DEBUG: Detection of duplications for redacted:redacted:get_auth_token.py
09:08:46.478 DEBUG: Detection of duplications for redacted:redacted:delete_queue_runner.py
09:08:46.479 INFO: CPD calculation finished
09:08:46.557 INFO: Analysis report generated in 74ms, dir size=104 KB
09:08:46.583 INFO: Analysis reports compressed in 25ms, zip size=43 KB
09:08:46.583 INFO: Analysis report generated in /var/lib/jenkins/workspace/redacted-sonar/.sonar/batch-report
09:08:46.583 DEBUG: Upload report
09:08:46.612 DEBUG: POST 200 http://redacted.com/api/ce/submit?projectKey=redacted:redacted&projectName=redacted | time=27ms
09:08:46.614 INFO: Analysis report uploaded in 31ms
09:08:46.614 INFO: ANALYSIS SUCCESSFUL, you can browse http://redacted.com/dashboard/index/redacted:redacted
09:08:46.614 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
09:08:46.614 INFO: More about the report processing at http://redacted.com/api/ce/task?id=redacted
09:08:46.619 DEBUG: Report metadata written to /var/lib/jenkins/workspace/redacted-sonar/.sonar/report-task.txt
09:08:46.620 DEBUG: Post-jobs :
09:08:46.622 INFO: Task total time: 3.396 s
09:08:46.622 INFO: ------------------------------------------------------------------------
09:08:46.622 INFO: EXECUTION SUCCESS
09:08:46.622 INFO: ------------------------------------------------------------------------
09:08:46.622 INFO: Total time: 4.610s
09:08:46.715 INFO: Final Memory: 45M/163M
09:08:46.715 INFO: ------------------------------------------------------------------------
09:08:46.716 DEBUG: Execution getVersion
09:08:46.716 DEBUG: Execution stop

버전 :

Java 1.8.0_121 Oracle Corporation
Linux 3.10.0-514.6.1.el7.x86_64 amd64
SonarQube server 6.2
pylint 1.6.5,
astroid 1.4.9
Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Plugins:
  * Python 1.7.0.1195 (python)
  * CSS / SCSS / Less 3.1 (css)
  * Web 2.5.0.476 (web)
  * Git 1.2 (scmgit)
  * JSON 2.2 (JSON)
  * SonarJS 2.20.0.4207 (javascript)

파일럿 출력 예 :

************* Module tq
tq.py:1: [R0801(duplicate-code), ] Similar lines in 2 files
==app.app:246
==get_auth_token:13
***REDACTED RAW CODE***
tq.py:1: [R0801(duplicate-code), ] Similar lines in 2 files
==checks_queue_runner:1
==queue_runner:1
***REDACTED RAW CODE***
# connect to consul
tq.py:1: [R0801(duplicate-code), ] Similar lines in 3 files
==checks_queue_runner:1
==clear_queue:1
==queue_runner:1
***REDACTED RAW CODE***
tq.py:1: [R0801(duplicate-code), ] Similar lines in 2 files
==app.app:40
==tq:11
***REDACTED RAW CODE***
tq.py:1: [R0801(duplicate-code), ] Similar lines in 4 files
==checks_queue_runner:1
==clear_queue:1
==delete_queue_runner:2
==queue_runner:1
***REDACTED RAW CODE***

Report
======
774 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |12     |12         |=          |25.00       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |1      |1          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |16     |16         |=          |93.75       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |25     |25         |=          |8.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies
---------------------
::
    app
      \-app (run)
        \-app (app)
    osclient (clear_queue,app.app,queue_runner,checks_queue_runner,delete_queue_runner)
    six (osclient)

Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |895    |66.59 |895      |=          |
+----------+-------+------+---------+-----------+
|docstring |102    |7.59  |102      |=          |
+----------+-------+------+---------+-----------+
|comment   |141    |10.49 |141      |=          |
+----------+-------+------+---------+-----------+
|empty     |206    |15.33 |206      |=          |
+----------+-------+------+---------+-----------+

Duplication
-----------
+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |97    |97       |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |7.282 |7.282    |=          |
+-------------------------+------+---------+-----------+

Messages by category
--------------------
+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |238    |238      |=          |
+-----------+-------+---------+-----------+
|refactor   |16     |16       |=          |
+-----------+-------+---------+-----------+
|warning    |681    |681      |=          |
+-----------+-------+---------+-----------+
|error      |41     |41       |=          |
+-----------+-------+---------+-----------+

% errors / warnings by module
-----------------------------
+--------------------+------+--------+---------+-----------+
|module              |error |warning |refactor |convention |
+====================+======+========+=========+===========+
|app.app             |21.95 |56.09   |25.00    |43.28      |
+--------------------+------+--------+---------+-----------+
|delete_queue_runner |19.51 |4.99    |25.00    |7.98       |
+--------------------+------+--------+---------+-----------+
|queue_runner        |14.63 |14.39   |12.50    |15.97      |
+--------------------+------+--------+---------+-----------+
|checks_queue_runner |14.63 |8.22    |0.00     |7.56       |
+--------------------+------+--------+---------+-----------+
|clear_queue         |14.63 |7.05    |0.00     |6.30       |
+--------------------+------+--------+---------+-----------+
|get_auth_token      |4.88  |7.78    |0.00     |4.62       |
+--------------------+------+--------+---------+-----------+
|osclient            |4.88  |0.88    |6.25     |7.56       |
+--------------------+------+--------+---------+-----------+
|app.__init__        |2.44  |0.15    |0.00     |1.26       |
+--------------------+------+--------+---------+-----------+
|tq                  |2.44  |0.00    |31.25    |3.78       |
+--------------------+------+--------+---------+-----------+
|config              |0.00  |0.29    |0.00     |1.26       |
+--------------------+------+--------+---------+-----------+
|run                 |0.00  |0.15    |0.00     |0.42       |
+--------------------+------+--------+---------+-----------+

Messages
--------
+------------------------------+------------+
|message id                    |occurrences |
+==============================+============+
|mixed-indentation             |233         |
+------------------------------+------------+
|bad-indentation               |204         |
+------------------------------+------------+
|unused-wildcard-import        |149         |
+------------------------------+------------+
|invalid-name                  |75          |
+------------------------------+------------+
|bad-whitespace                |49          |
+------------------------------+------------+
|line-too-long                 |44          |
+------------------------------+------------+
|import-error                  |38          |
+------------------------------+------------+
|unused-variable               |33          |
+------------------------------+------------+
|missing-docstring             |33          |
+------------------------------+------------+
|unused-import                 |32          |
+------------------------------+------------+
|bad-continuation              |18          |
+------------------------------+------------+
|wrong-import-order            |11          |
+------------------------------+------------+
|unnecessary-semicolon         |8           |
+------------------------------+------------+
|wildcard-import               |6           |
+------------------------------+------------+
|unused-argument               |5           |
+------------------------------+------------+
|duplicate-code                |5           |
+------------------------------+------------+
|redefined-outer-name          |4           |
+------------------------------+------------+
|bare-except                   |4           |
+------------------------------+------------+
|too-many-statements           |3           |
+------------------------------+------------+
|too-many-locals               |3           |
+------------------------------+------------+
|too-many-arguments            |3           |
+------------------------------+------------+
|superfluous-parens            |3           |
+------------------------------+------------+
|undefined-variable            |2           |
+------------------------------+------------+
|trailing-whitespace           |2           |
+------------------------------+------------+
|wrong-import-position         |1           |
+------------------------------+------------+
|too-many-nested-blocks        |1           |
+------------------------------+------------+
|too-many-format-args          |1           |
+------------------------------+------------+
|too-many-branches             |1           |
+------------------------------+------------+
|singleton-comparison          |1           |
+------------------------------+------------+
|relative-import               |1           |
+------------------------------+------------+
|old-style-class               |1           |
+------------------------------+------------+
|broad-except                  |1           |
+------------------------------+------------+
|anomalous-backslash-in-string |1           |
+------------------------------+------------+

Global evaluation
-----------------
Your code has been rated at -4.73/10 (previous run: -4.73/10, +0.00)

수정 내 exec 쉘 단계의 일부로 pylint-report.txt를 jenkins : jenkins에 chowning 하여이 작업을 수행 할 수 있었고 그것이 효과가있는 것으로 보입니다.

  • 답변 # 1

    같은 문제가 있었지만 해결책은 달랐습니다 :소 나르 쿠브에서 주음 규칙 활성화. 필자는 Python 품질 프로파일에서 하나씩 활성화하여 설명 (sonarqube)이 더 이상 사용되지 않는다고 말한 pylint 규칙의 코드를 적어 두었습니다.

    일반적으로 pylint 규칙은 "내장 된"SonarAnalyzer for Python이 이미 동일한 규칙을 가진 경우 sonarqube에서 더 이상 사용되지 않는 것으로 간주됩니다. (우리는 두 가지 규칙으로 같은 문제가보고되는 것을 원하지 않습니다.)

    이것은 내가 sonarqube에서 더 이상 사용되지 않는 것으로 발견 된 pylint 규칙입니다. pylint.cfg 파일에서해제했습니다파일.  와이즈 비즈

    규칙을 활성화 할 때 심각도를 지정하므로 하나씩 수행하면귀하의프로젝트에 대해 각 유형의 위반이 "불쾌"하는 방식을 구성 할 수 있습니다.

    C0103,C0111,C0112,C0301,C0302,C0303,C0304,C0321,C0325,C1001,E0100,E0101,E0103,E0104,E0105,E0106,E0107,E0235,R0201,R0801,R0911,R0912,R0913,W0101,W0107,W0122,W0331,W0333,W1401

  • 이전 Nodejs MySQL 오류 처리
  • 다음 ios - 다단계 배열을 사전으로 변환