Commit 21b47272 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch '4939-codeclimate-description' into 'master'

Resolve "Code quality shows `check_name`, but should show `description`"

Closes #4939

See merge request gitlab-org/gitlab-ee!4652
parents 23def3c7 4aa19a60
......@@ -18,7 +18,7 @@ import { stripHtml } from '~/lib/utils/text_utility';
*/
export const parseIssues = (issues = [], path = '') => issues.map((issue) => {
const parsedIssue = {
name: issue.check_name || issue.message,
name: issue.description || issue.message,
...issue,
};
......
---
title: Replace check_name key with description in codeclimate results for a more human
readable description
merge_request:
author:
type: changed
......@@ -223,6 +223,7 @@ export default {
export const headIssues = [
{
check_name: 'Rubocop/Lint/UselessAssignment',
description: 'Insecure Dependency',
location: {
path: 'lib/six.rb',
lines: {
......@@ -235,6 +236,7 @@ export const headIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......@@ -249,6 +251,7 @@ export const headIssues = [
export const parsedHeadIssues = [
{
check_name: 'Rubocop/Lint/UselessAssignment',
description: 'Insecure Dependency',
location: {
path: 'lib/six.rb',
lines: {
......@@ -257,7 +260,7 @@ export const parsedHeadIssues = [
},
},
fingerprint: 'e879dd9bbc0953cad5037cde7ff0f627',
name: 'Rubocop/Lint/UselessAssignment',
name: 'Insecure Dependency',
path: 'lib/six.rb',
urlPath: 'headPath/lib/six.rb#L6',
line: 6,
......@@ -268,6 +271,7 @@ export const baseIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......@@ -280,6 +284,7 @@ export const baseIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......@@ -295,6 +300,7 @@ export const parsedBaseIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......
......@@ -3,6 +3,7 @@ export const baseIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......@@ -15,6 +16,7 @@ export const baseIssues = [
{
categories: ['Security'],
check_name: 'Insecure Dependency',
description: 'Insecure Dependency',
location: {
path: 'Gemfile.lock',
lines: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment