IBM / go-repo-template

Repo template for Go.
Apache License 2.0
4 stars 17 forks source link

lint-markdown failed on prow but not locally. #26

Closed itdove closed 5 years ago

itdove commented 5 years ago

When running locally by running make lint-markdown, I have no error and these url are not accessible locally.

make lint-markdown
> Checking links in ./docs/development.md
> Will allow duplicate links
> Will allow redirects
> Will allow SSL errors
> Will allow network timeouts
> White list links matching: ./docs/deployment.md 
> Will not save results
Links to check: 1, 0 white listed
  1. https://github.com/thlorenz/doctoc 
Checking URLs: ✓
No issues :-)
> Checking links in ./README.md
> Will allow duplicate links
> Will allow redirects
> Will allow SSL errors
> Will allow network timeouts
> White list links matching: ./docs/deployment.md 
> Will not save results
Links to check: 9, 0 white listed
  1. http://35.227.205.240/?job=build_multicloud-operators-subscription-release_postsubmit 
  2. http://35.227.205.240/badge.svg?jobs=build_multicloud-operators-subscription-release_postsubmit 
  3. https://godoc.org/github.com/IBM/multicloud-operators-subscription-release 
  4. https://godoc.org/github.com/IBM/multicloud-operators-subscription-release?status.svg 
  5. https://goreportcard.com/report/github.com/IBM/multicloud-operators-subscription-release 
  6. https://goreportcard.com/badge/github.com/IBM/multicloud-operators-subscription-release 
  7. https://codecov.io/github/IBM/multicloud-operators-subscription-release?branch=master 
  8. https://codecov.io/gh/IBM/multicloud-operators-subscription-release/branch/master/graphs/badge.svg?branch=master 
  9. https://github.com/thlorenz/doctoc 
Checking URLs: ✓✓✓✓✓✓✓✓✓
No issues :-)
> Checking links in ./RELEASE.md
> Will allow duplicate links
> Will allow redirects
> Will allow SSL errors
> Will allow network timeouts
> White list links matching: ./docs/deployment.md 
> Will not save results
Links to check: 1, 0 white listed
  1. https://github.com/thlorenz/doctoc 
Checking URLs: ✓
No issues :-)
> Checking links in ./CONTRIBUTING.md
> Will allow duplicate links
> Will allow redirects
> Will allow SSL errors
> Will allow network timeouts
> White list links matching: ./docs/deployment.md 
> Will not save results
Links to check: 2, 0 white listed
  1. https://github.com/thlorenz/doctoc 
  2. https://github.com/ibm 
Checking URLs: ✓✓
No issues :-)

Summary
./docs/development.md: ✓
          ./README.md: ✓
         ./RELEASE.md: ✓
    ./CONTRIBUTING.md: ✓

but when running on prow, I have errors: http://35.227.205.240/log?job=check_multicloud-operators-subscription-release&id=1186726070892630018

Why locally the whitelist contains deployment.md and in prow development.md

itdove commented 5 years ago

Ok, I thiink I found something in the https://github.com/IBM/go-repo-template/blob/b7d8cb4c58d02163466d30e962605bfe75d81113/common/Makefile.common.mk#L62 The MARKDOWN_LINT_WHITELIST env var is empty and so the XARGS takes the file name to test as a value for the --white-list

Is the MARKDOWN_LINT_WHITELIST have somehow an assigned value on prow environment?

or the --white-list not set when running on prow?

itdove commented 5 years ago

Setting MARKDOWN_LINT_WHITELIST worked.

1) I think some-line must be added in the https://github.com/IBM/go-repo-template/blob/master/Makefile to explain the use of that variable. 2) the Makefile.common.mk must be fixed to use the --white-list only when the MARKDOWN_LINT_WHITELIST is set.

itdove commented 5 years ago

https://github.com/IBM/go-repo-template/pull/35