All Projects → 1c-syntax → Sonar Bsl Plugin Community

1c-syntax / Sonar Bsl Plugin Community

Licence: gpl-3.0
Поддержка языка 1С:Предприятие 8 и OneScript для SonarQube.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sonar Bsl Plugin Community

Zebrunner
Zebrunner is a Test Automation Management Tool
Stars: ✭ 131 (-10.88%)
Mutual labels:  sonarqube, hacktoberfest
Documentation
The source for Datadog's documentation site.
Stars: ✭ 147 (+0%)
Mutual labels:  hacktoberfest
100daysofmlcode
My journey to learn and grow in the domain of Machine Learning and Artificial Intelligence by performing the #100DaysofMLCode Challenge.
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Django Sql Explorer
Easily share data across your company via SQL queries. From Grove Collab.
Stars: ✭ 1,958 (+1231.97%)
Mutual labels:  hacktoberfest
Promster
⏰A Prometheus exporter for Hapi, express and Marble.js servers to automatically measure request timings 📊
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Handwritten.js
Convert typed text to realistic handwriting!
Stars: ✭ 1,806 (+1128.57%)
Mutual labels:  hacktoberfest
Photoprism
Photos App powered by Go and Google TensorFlow 🌈
Stars: ✭ 17,946 (+12108.16%)
Mutual labels:  hacktoberfest
Custom Pod Autoscaler
Custom Pod Autoscaler base, allows creation of Custom Pod Autoscalers
Stars: ✭ 148 (+0.68%)
Mutual labels:  hacktoberfest
Hads
📚 Markdown superpowered documentation for Node.js
Stars: ✭ 147 (+0%)
Mutual labels:  hacktoberfest
Rom Rails
Rails integration for Ruby Object Mapper
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Librobotcontrol
Robotics Focused library for embedded Linux computers.
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Box Node Sdk
A Javascript interface for interacting with the Box API. You can find the node package at
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Hacktoberfest2020
Make your first PR! ~ A beginner-friendly repository. Add your profile, a blog, or any program under any language (it can be anything from a hello-world program to a complex data structure algorithm) or update the existing one. Just make sure to add the file under the correct directory. Happy hacking!
Stars: ✭ 147 (+0%)
Mutual labels:  hacktoberfest
Http
Universal HTTP Module for Nuxt.js
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Macos Defaults
Incomplete list of macOS `defaults` commands with demos ✨
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+7721.77%)
Mutual labels:  hacktoberfest
Crafttweaker
Tweak your minecraft experience
Stars: ✭ 146 (-0.68%)
Mutual labels:  hacktoberfest
Parse Sdk Android
The Android SDK for the Parse Platform
Stars: ✭ 1,806 (+1128.57%)
Mutual labels:  hacktoberfest
Rioxarray
geospatial xarray extension powered by rasterio
Stars: ✭ 148 (+0.68%)
Mutual labels:  hacktoberfest
Znc
Official repository for the ZNC IRC bouncer
Stars: ✭ 1,851 (+1159.18%)
Mutual labels:  hacktoberfest

SonarQube 1C (BSL) Community Plugin

Actions Status Download Quality Gate Maintainability Coverage telegram

Поддержка языка 1С:Предприятие 8 и OneScript для SonarQube.

Сайт проекта -> https://1c-syntax.github.io/sonar-bsl-plugin-community/

English version -> https://1c-syntax.github.io/sonar-bsl-plugin-community/en/

Возможности

  • Project "Overview" dashboard;
  • Подсветка исходного кода 1С:Предприятие;
  • Расчет базовых метрик, расчет количества строк кода;
  • Регистрация диагностик, предоставляемых BSL Language Server как внутренних правил;
  • Встроенный анализатор - BSL Language Server Diagnostic provider
  • Импорт результатов внешних анализаторов во внутреннем формате json;

Установка и обновление

  • Скачать jar-файл со страницы релизов
  • Разместить jar-файл согласно разделу Manual Installation официальной документации (по умолчанию - каталог $SONARQUBE_HOME/extensions/plugins)
  • Перезапустить сервер

Требования

Версия SonarQube Версия плагина
7.9+ 0.7.0+
7.4 - 7.8 0.1.0...0.6.0
Версия плагина Версия JAVA
1.0+ 11
0.1.0 - 0.6.0 8

Запуск анализа

Настройка окружения

Для анализа исходных кодов 1С используется утилита sonar-scanner.

Утилите неоходимо указать параметры анализа одним из нижеперечисленных способов:

  • в качестве аргументов командной строки, используя синтаксис -DимяПараметра=значениеПараметра
  • используя файл sonar-project.properties

Пример файла sonar-project.properties:

# Ключ проекта. Уникальный в пределах сервера SonarQube
sonar.projectKey=my_project
# Имя проекта, отображаемое в интерфейсе SonarQube. Значение по умолчанию - ключ проекта.
sonar.projectName=My project
# Версия проекта
sonar.projectVersion=1.0
 
# Путь к исходным кодам. Относительные пути разрешаются от файла sonar-project.properties
# В качестве разделителя пути используется прямой слэш - /. Можно указать несколько каталогов через запятую.
sonar.sources=src
 
# Кодировка файлов исходных кодов.
sonar.sourceEncoding=UTF-8

# Фильтры на включение в анализ. В примере ниже - только bsl и os файлы.
sonar.inclusions=**/*.bsl, **/*.os

Способы передачи параметров можно комбинировать.

Если на сервере SonarQube включено требование принудительной авторизации и/или запрет анонимного анализа проектов, утилите sonar-scanner дополнительно нужно передавать токен авторизации, который можно получить согласно инструкции User guide/User token

Пример строки запуска

sonar-scanner -Dsonar.host.url=http://sonar.company.com -Dsonar.login=SONAR_AUTH_TOKEN

Настройки плагина

  • sonar.bsl.languageserver.diagnosticLanguage - язык имен правил и текстов сообщений сработавших правил от BSL Language Server. По умолчанию - ru - русский;
  • sonar.bsl.languageserver.enabled - использование встроенного анализатора BSL Language Server Diagnostic provider при запуске анализа через sonar-scanner. По умолчанию - true - включен;
  • sonar.bsl.languageserver.reportPaths - путь к файлам отчетов во внутреннем формате BSL Language Server - json. По умолчанию - "" - не заполнено.

Интеграция с BSL Language Server

По умолчанию в качестве анализатора используется встроенный провайдер диагностик из BSL Language Server.

Выполнение анализа встроенным анализатором можно отключить, установив параметру sonar.bsl.languageserver.enabled значение false через командную строку или файл настроек.

sonar-scanner -Dsonar.bsl.languageserver.enabled=false

Отключение анализатора не отключает процесс парсинга файлов. Расчет метрик и подсветка синтаксиса будут работать вне зависимости от значения настройки.

Импорт результатов из внешнего файла

BSL Language Server может запускать анализ исходного кода и выдавать список обнаруженых диагностик в виде json-файла. Инструкция по запуску BSL Language Server в режиме анализа расположена на странице проекта.

Для импорта результата при запуске утилиты sonar-scanner нужно передать параметр sonar.bsl.languageserver.reportPaths через аргументы командной строки или через файл sonar-project.properties, в котором указать путь к файлу (или файлам, через запятую) с результатами анализа.

sonar-scanner -Dsonar.bsl.languageserver.reportPaths=./bsl-json.json
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].