This repository has been archived by the owner on Jan 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Code quality metrics
Frank Niessink edited this page Oct 1, 2018
·
3 revisions
HQ currently only supports SonarQube as metric source for code quality metrics.
First, create a SonarQube metric source and add it to the project:
SONAR = metric_source.Sonar("http://sonar:9000/")
PROJECT = Project(
...
metric_sources={metric_source.Sonar: SONAR})
Then, for each component and application, tell HQ which key to use:
COMPONENT = Component(
...
metric_source_ids={SONAR: "key of component in Sonar"})
Applications and components have the requirement.CodeQuality
and the requirement.ViolationsBySeverity
by default. The violations by severity requirement makes HQ measure blocker, critical, and major violations (minor and info violations not reported on). To have HQ measure the violations by type (bugs, vulnerabilities, and code smells) turn on the requirement.ViolationsByType
add it to the component or application:
COMPONENT = Component(
...
added_requirements=[requirement.ViolationsByType])
To turn off the violations by severity metrics, remove the requirement:
COMPONENT = Component(
...
removed_requirements=[requirement.ViolationsBySeverity])
General
Metrics
- Accessibility metric
- Action log metrics
- Aggregated test coverage metrics
- CI server metrics
- Code quality metrics
- Issue tracker metrics
- OWASP dependency check metrics
- Performance test metrics
- Prediction metrics
- Risk log metrics
- System test metrics
- System test coverage metrics
- Unit test metrics
- Unit test coverage metrics
- Version control system metrics
Metric sources
- Bamboo test report
- Checkmarx
- Git
- GitLabCI
- History
- Jenkins
- Jenkins test report
- Jira Action List
- Jira backlog
- Jira filter
- Junit test report
- OJ Audit
- Robot Framework test report
- Sharepoint Planner
- SonarQube
- Trello
- Wekan
Contributing