debian-mirror-gitlab/spec/frontend/diffs/mock_data/diff_code_quality.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-08-13 15:12:31 +05:30
export const multipleFindingsArr = [
{
severity: 'minor',
description: 'Unexpected Debugger Statement.',
line: 2,
},
{
severity: 'major',
description:
'Function `aVeryLongFunction` has 52 lines of code (exceeds 25 allowed). Consider refactoring.',
line: 3,
},
{
severity: 'minor',
description: 'Arrow function has too many statements (52). Maximum allowed is 30.',
line: 3,
},
];
export const multipleFindings = {
filePath: 'index.js',
codequality: multipleFindingsArr,
};
export const singularFinding = {
filePath: 'index.js',
codequality: [multipleFindingsArr[0]],
};
export const diffCodeQuality = {
diffFile: { file_hash: '123' },
diffLines: [
{
left: {
type: 'old',
old_line: 1,
new_line: null,
codequality: [],
2022-11-25 23:54:43 +05:30
lineDrafts: [],
2022-08-13 15:12:31 +05:30
},
},
{
left: {
type: null,
old_line: 2,
new_line: 1,
codequality: [],
2022-11-25 23:54:43 +05:30
lineDrafts: [],
2022-08-13 15:12:31 +05:30
},
},
{
left: {
type: 'new',
old_line: null,
new_line: 2,
codequality: [multipleFindingsArr[0]],
2022-11-25 23:54:43 +05:30
lineDrafts: [],
2022-08-13 15:12:31 +05:30
},
},
],
};