Commit 4cf45a52 authored by Filipa Lacerda's avatar Filipa Lacerda

Adds line number in the path

parent f7eb7336
...@@ -790,7 +790,7 @@ ...@@ -790,7 +790,7 @@
.mr-widget-code-quality-list { .mr-widget-code-quality-list {
list-style: none; list-style: none;
padding: 4px 36px; padding: 0px 36px;
margin: 0; margin: 0;
line-height: $code_line_height; line-height: $code_line_height;
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
:href="issue.location.urlPath" :href="issue.location.urlPath"
target="_blank" target="_blank"
rel="noopener noreferrer nofollow"> rel="noopener noreferrer nofollow">
{{issue.location.path}} {{issue.location.path}}<template v-if="issue.location.lines && issue.location.lines.begin">:{{issue.location.lines.begin}}</template>
</a> </a>
</li> </li>
</ul> </ul>
......
...@@ -22,7 +22,9 @@ describe('merge request code quality issues', () => { ...@@ -22,7 +22,9 @@ describe('merge request code quality issues', () => {
path: 'bar', path: 'bar',
urlPath: 'foo', urlPath: 'foo',
positions: '81', positions: '81',
lines: '21', lines: {
begin: '21',
},
}, },
}], }],
}); });
...@@ -31,7 +33,7 @@ describe('merge request code quality issues', () => { ...@@ -31,7 +33,7 @@ describe('merge request code quality issues', () => {
it('should render issue', () => { it('should render issue', () => {
expect( expect(
vm.$el.querySelector('li').textContent.trim().replace(/\s+/g, ''), vm.$el.querySelector('li').textContent.trim().replace(/\s+/g, ''),
).toEqual('Fixed:fooinbar'); ).toEqual('Fixed:fooinbar:21');
}); });
}); });
...@@ -44,7 +46,9 @@ describe('merge request code quality issues', () => { ...@@ -44,7 +46,9 @@ describe('merge request code quality issues', () => {
location: { location: {
path: 'bar', path: 'bar',
positions: '81', positions: '81',
lines: '21', lines: {
begin: '21',
},
}, },
}], }],
}); });
...@@ -65,7 +69,9 @@ describe('merge request code quality issues', () => { ...@@ -65,7 +69,9 @@ describe('merge request code quality issues', () => {
location: { location: {
path: 'bar', path: 'bar',
positions: '81', positions: '81',
lines: '21', lines: {
begin: '21',
},
}, },
}], }],
}); });
......
...@@ -268,4 +268,4 @@ export const baseIssues = [ ...@@ -268,4 +268,4 @@ export const baseIssues = [
}, },
"fingerprint": "ca2354534dee94ae60ba2f54e3857c50e5", "fingerprint": "ca2354534dee94ae60ba2f54e3857c50e5",
} }
] ];
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