Make Go errors visible
This commit is contained in:
parent
a4a31b7e80
commit
c2fc6f3698
|
@ -179,14 +179,14 @@ export async function checkGoDependenciesAsync(
|
||||||
line,
|
line,
|
||||||
}
|
}
|
||||||
const newAnnotation = (level: 'notice' | 'warning' | 'failure', message: string) => {
|
const newAnnotation = (level: 'notice' | 'warning' | 'failure', message: string) => {
|
||||||
const title = `Dependency '${name}' is locked with ${dependency.rawRefType} '${dependency.refName}'.`
|
const title = `Dependency "${name}" is locked with ${dependency.rawRefType} '${dependency.refName}'.`
|
||||||
result.annotations.push(createAnnotation(annotation, level, title, message))
|
result.annotations.push(createAnnotation(annotation, level, title, message))
|
||||||
}
|
}
|
||||||
switch (refType) {
|
switch (refType) {
|
||||||
case 'tag':
|
case 'tag':
|
||||||
continue
|
continue
|
||||||
case 'commit':
|
case 'commit':
|
||||||
newAnnotation('notice',
|
newAnnotation(name.startsWith('github.com/status-im/') ? 'warning' : 'notice',
|
||||||
`A commit SHA is not a deterministic dependency locator.
|
`A commit SHA is not a deterministic dependency locator.
|
||||||
If the commit is overwritten by a force-push, it will be impossible to rebuild the same output in the future.
|
If the commit is overwritten by a force-push, it will be impossible to rebuild the same output in the future.
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ Please lock the dependency with a tag/release.`,
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
case 'branch':
|
case 'branch':
|
||||||
newAnnotation('notice', // TODO: change this to 'failure' once we've fixed issues in the codebase
|
newAnnotation('failure',
|
||||||
`A branch is not a deterministic dependency locator.
|
`A branch is not a deterministic dependency locator.
|
||||||
If the branch advances, it will be impossible to rebuild the same output in the future.
|
If the branch advances, it will be impossible to rebuild the same output in the future.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue