# Code Quality
> 原文:[https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html)
* [Use cases](#use-cases)
* [Example configuration](#example-configuration)
* [Previous job definitions](#previous-job-definitions)
* [Configuring jobs using variables](#configuring-jobs-using-variables)
* [Implementing a custom tool](#implementing-a-custom-tool)
* [Code Quality reports](#code-quality-reports)
* [Extending functionality](#extending-functionality)
* [Using Analysis Plugins](#using-analysis-plugins)
* [Troubleshooting](#troubleshooting)
* [Changing the default configuration has no effect](#changing-the-default-configuration-has-no-effect)
* [No Code Quality report is displayed in a Merge Request](#no-code-quality-report-is-displayed-in-a-merge-request)
* [Only a single Code Quality report is displayed, but more are defined](#only-a-single-code-quality-report-is-displayed-but-more-are-defined)
# Code Quality[](#code-quality-starter "Permalink")
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1984) in [GitLab Starter](https://about.gitlab.com/pricing/) 9.3.
确保项目的代码保持简单,易读和易于贡献可能会引起问题. 借助[GitLab CI / CD](../../../ci/README.html) ,您可以使用 GitLab 代码质量分析源代码质量.
代码质量:
* 使用[Code Climate Engines](https://codeclimate.com) ,它们是免费的开放源代码. 代码质量不需要"代码气候"订阅.
* 使用[默认的 Code Climate 配置](https://gitlab.com/gitlab-org/ci-cd/codequality/-/tree/master/codeclimate_defaults)在[GitLab Code Quality](https://gitlab.com/gitlab-org/ci-cd/codequality)项目中构建的 Docker 映像在[管道中](../../../ci/pipelines/index.html)运行.
* 可以利用[模板](#example-configuration) .
* 可与[Auto DevOps 一起使用](../../../topics/autodevops/stages.html#auto-code-quality-starter) .
* 可以通过[分析插件](https://docs.codeclimate.com/docs/list-of-engines)或[自定义工具](#implementing-a-custom-tool)进行扩展.
更进一步,GitLab 可以在合并请求小部件区域中显示"代码质量"报告:
[![Code Quality Widget](https://img.kancloud.cn/f9/95/f995e676cd1a9927dc196581c868fd26_1710x430.png)](img/code_quality.png)
观看实践中的代码质量快速演练:
观看视频: [代码质量:快速运行](https://www.youtube.com/watch?v=B32LxtJKo9M) .
<figure class="video-container"><iframe src="https://www.youtube.com/embed/B32LxtJKo9M" frameborder="0" allowfullscreen=""></iframe></figure>
**注意:**对于一位客户,审核员发现,在 GitLab CI / CD 中使代码质量,SAST 和容器扫描全部自动化几乎比手动审核要好! [阅读更多](https://about.gitlab.com/customers/bi_worldwide/) .
另请参阅" [可维护性支持的语言](https://docs.codeclimate.com/docs/supported-languages-for-maintainability)的代码气候列表".
## Use cases[](#use-cases "Permalink")
例如,考虑以下工作流程:
1. 您的后端团队成员将开始新的实施,以更快地使您的应用中的某些功能.
2. 通过代码质量报告,他们可以分析其实施如何影响代码质量.
3. The metrics show that their code degrades the quality by 10 points.
4. 您要求同事来帮助他们进行此修改.
5. 他们都将对更改进行处理,直到"代码质量"报告显示不降级,仅显示改进.
6. 您批准合并请求并授权其部署到暂存.
7. 验证后,其更改将部署到生产中.
## Example configuration[](#example-configuration "Permalink")
**注意:** GitLab 11.11 和更高版本支持以下所示的作业定义. 它还需要 GitLab Runner 11.5 或更高版本. 对于早期版本,请使用[先前的作业定义](#previous-job-definitions) .
本示例说明如何使用 GitLab CI / CD 和 Docker 在代码上运行代码质量.
首先,您需要配置 GitLab Runner:
* 对于[Docker-in-Docker 工作流程](../../../ci/docker/using_docker_build.html#use-docker-in-docker-workflow-with-docker-executor) .
* 有足够的磁盘空间来处理生成的代码质量文件. 例如,在[GitLab 项目上](https://gitlab.com/gitlab-org/gitlab) ,文件约为 7 GB.
设置运行器后,在您的 CI 配置中包括代码质量模板:
```
include:
- template: Code-Quality.gitlab-ci.yml
```
上面的示例将在 CI / CD 管道中创建一个`code_quality`作业,该作业将扫描源代码以查看代码质量问题. 该报告将另存为["代码质量"报告工件](../../../ci/pipelines/job_artifacts.html#artifactsreportscodequality-starter) ,您以后可以下载和分析该[工件](../../../ci/pipelines/job_artifacts.html#artifactsreportscodequality-starter) .
通过设置`CODE_QUALITY_IMAGE`变量,也可以覆盖 URL 到"代码质量"图像. 如果您想锁定特定版本的 Code Quality 或使用其中的一个分支,这将特别有用:
```
include:
- template: Code-Quality.gitlab-ci.yml
code_quality:
variables:
CODE_QUALITY_IMAGE: "registry.example.com/codequality-fork:latest"
```
默认情况下,报告工件不可下载. 如果需要在工作详细信息页面上下载它们,则可以将`gl-code-quality-report.json`到工件路径,如下所示:
```
include:
- template: Code-Quality.gitlab-ci.yml
code_quality:
artifacts:
paths: [gl-code-quality-report.json]
```
包含的`code_quality`作业正在`test`阶段运行,因此需要将其包含在 CI 配置中,如下所示:
```
stages:
- test
```
**提示:**该信息将被自动提取并显示在合并请求小部件中.**注意:**在自我管理的实例上,如果恶意行为者破坏了 Code Quality 作业定义,则他们将能够在 Runner 主机上执行特权的 Docker 命令. 拥有适当的访问控制策略,可以通过仅允许访问受信任的参与者来减轻这种攻击.
### Previous job definitions[](#previous-job-definitions "Permalink")
**警告:**在 GitLab 11.5 之前,必须专门命名代码质量作业和工件以自动提取报告数据并将其显示在合并请求小部件中. 尽管这些旧的作业定义仍然保留,但它们已被弃用,并且在 GitLab 12.0 或更高版本中不再受支持. 建议您更新`.gitlab-ci.yml`配置以反映该更改.
对于 GitLab 11.5 及更高版本,该工作应如下所示:
```
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/ci-cd/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json
```
在 GitLab 12.6 中,"代码质量"切换到了[新的版本控制方案](https://gitlab.com/gitlab-org/ci-cd/codequality#versioning-and-release-cycle) . 强烈建议包括代码质量模板,如[示例配置](#example-configuration)所示,该模板使用新的版本控制方案. 如果不使用模板,则可以将`SP_VERSION`变量硬编码为使用新的映像版本:
```
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
SP_VERSION: 0.85.6
allow_failure: true
services:
- docker:stable-dind
script:
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/ci-cd/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json
```
对于 GitLab 11.4 和更早版本,该工作应如下所示:
```
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/ci-cd/codequality:$SP_VERSION" /code
artifacts:
paths: [gl-code-quality-report.json]
```
或者,作业名称可以是`codeclimate`或`codequality` ,工件名称可以是`codeclimate.json` . 这些名称已在 GitLab 11.0 中弃用,并可能在下一个主要版本 GitLab 12.0 中删除.
对于 GitLab 10.3 及更早版本,该工作应如下所示:
```
codequality:
image: docker:latest
variables:
DOCKER_DRIVER: overlay
services:
- docker:dind
script:
- docker pull codeclimate/codeclimate:0.69.0
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 init
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 analyze -f json > codeclimate.json || true
artifacts:
paths: [codeclimate.json]
```
## Configuring jobs using variables[](#configuring-jobs-using-variables "Permalink")
代码质量作业支持环境变量,用户可以将其设置为在运行时配置作业执行.
For a list of available environment variables, see [Environment variables](https://gitlab.com/gitlab-org/ci-cd/codequality#environment-variables).
## Implementing a custom tool[](#implementing-a-custom-tool "Permalink")
可以使用自定义工具在 GitLab 中提供代码质量报告. 去做这个:
1. 在`.gitlab-ci.yml`文件中定义一个生成[代码质量报告工件的作业](../../../ci/pipelines/job_artifacts.html#artifactsreportscodequality-starter) .
2. 配置您的工具以将代码质量报告工件作为 JSON 文件生成,该文件实现了[Code Climate 规范](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types)的子集.
代码质量报告工件 JSON 文件必须包含具有以下属性的对象数组:
| Name | Description |
| --- | --- |
| `description` | A description of the code quality violation. |
| `fingerprint` | 用于识别代码质量违规的唯一指纹. 例如,MD5 哈希. |
| `location.path` | 包含代码质量违规的文件的相对路径. |
| `location.lines.begin` | 发生代码质量违规的行. |
Example:
```
[ { "description": "'unused' is assigned a value but never used.", "fingerprint": "7815696ecbf1c96e6894b779456d330e", "location": { "path": "lib/index.js", "lines": { "begin": 42 } } } ]
```
**注意:**尽管 Code Climate 规范支持更多属性,但 GitLab 会忽略这些属性.
## Code Quality reports[](#code-quality-reports "Permalink")
代码质量工作完成后:
* 管道生成的违反代码质量的完整列表可在"管道详细信息"页面的"代码质量"选项卡中找到.
* 代码质量的潜在更改直接在合并请求中显示. 合并请求中的"代码质量"窗口小部件比较分支基础和头部的报告,然后列出合并分支时将解决或创建的所有违例.
* 完整的 JSON 报告可作为`code_quality`作业的可[下载工件](../../../ci/pipelines/job_artifacts.html#downloading-artifacts)获得.
## Extending functionality[](#extending-functionality "Permalink")
### Using Analysis Plugins[](#using-analysis-plugins "Permalink")
如果有需要延长的代码质量所提供的默认功能,如在规定[的代码质量](#code-quality-starter) , [分析插件](https://docs.codeclimate.com/docs/list-of-engines)可供选择.
例如,要使用[SonarJava 分析器](https://docs.codeclimate.com/docs/sonar-java) ,请在存储库的根目录中添加一个名为`.codeclimate.yml`的文件, `.codeclimate.yml`包含插件的[启用代码](https://docs.codeclimate.com/docs/sonar-java#enable-the-plugin) :
```
version: "2"
plugins:
sonar-java:
enabled: true
```
这会将 SonarJava 添加到项目中[默认`.codeclimate.yml`](https://gitlab.com/gitlab-org/ci-cd/codequality/-/blob/master/codeclimate_defaults/.codeclimate.yml)的`plugins:`部分.
对`plugins:`部分的更改不会影响 defeault `.codeclimate.yml`的`exclude_patterns`部分. 有关更多详细信息,请参见代码气候文档以[排除文件和文件夹](https://docs.codeclimate.com/docs/excluding-files-and-folders) .
这是[一个示例项目](https://gitlab.com/jheimbuck_gl/jh_java_example_project) , [该示例项目](https://gitlab.com/jheimbuck_gl/jh_java_example_project)将 Code Quality 与`.codeclimate.yml`文件一起使用.
## Troubleshooting[](#troubleshooting "Permalink")
### Changing the default configuration has no effect[](#changing-the-default-configuration-has-no-effect "Permalink")
一个普遍的问题是`Code Quality` (特定于 GitLab)和`Code Climate` (GitLab 使用的引擎)这两个术语非常相似. 您必须添加**`.codeclimate.yml`**文件来更改默认配置, **而不是** `.codequality.yml`文件. 如果使用错误的文件名,仍将使用[默认的`.codeclimate.yml`](https://gitlab.com/gitlab-org/ci-cd/codequality/-/blob/master/codeclimate_defaults/.codeclimate.yml) .
### No Code Quality report is displayed in a Merge Request[](#no-code-quality-report-is-displayed-in-a-merge-request "Permalink")
这可能是由于多种原因:
* 您刚刚在`.gitlab-ci.yml`添加了代码质量工作. 该报告尚无可比较的内容,因此无法显示任何信息. 将来的合并请求将具有可比性.
* 如果未[检测到降级或错误](https://docs.codeclimate.com/docs/maintainability#section-checks) ,则不会显示任何内容.
* [`artifacts:expire_in`](../../../ci/yaml/README.html#artifactsexpire_in) CI / CD 设置可能导致代码质量构件过期快于所需.
* `codeclimate.json`较大的`codeclimate.json`文件(尤其是> 10 MB)会[阻止报告的显示](https://gitlab.com/gitlab-org/gitlab/-/issues/2737) . 解决方法是,尝试删除[GitLab 忽略的](#implementing-a-custom-tool) [属性](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types) . 您可以:
* 配置代码质量工具以不输出那些类型.
* 在作业完成之前,请在`.gitlab-ci.yml`脚本中使用`sed` , `awk`或类似命令来编辑`codeclimate.json` .
### Only a single Code Quality report is displayed, but more are defined[](#only-a-single-code-quality-report-is-displayed-but-more-are-defined "Permalink")
GitLab 仅使用最新创建的作业(具有最大的作业 ID)的代码质量工件. 如果管道中的多个作业生成代码质量工件,则较早作业的那些将被忽略. 为避免混淆,仅配置一个作业即可生成`codeclimate.json` .
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license