这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@johnewing1
Copy link
Contributor

Add targets for generating coverage reports. Initial version of sonar config to exclude tests and vendored packages

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Description

Add two features.
Short cut for generating and viewing coverage reports by running make coverage
Added step to generate coverage report as part of checks for use by sonarcloud

Type of change

From the following, please check the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Makefile steps verified locally

Checklist:

  • [x ] This contribution follows the project's code of conduct
  • This contribution follows the project's contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Makefile Outdated
go test -covermode=count -coverprofile=coverage.out `go list ./... | grep -v integration`
go tool cover -html=coverage.out

.PHOHY: checks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed a typo here from the original makefile H/N

Would it be cleaner to have a single PHONY directive at the top of the file ?
Reduces repetition

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe. I don't really mind. 👍

muffix
muffix previously approved these changes May 14, 2020
Copy link
Member

@muffix muffix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, let's see how Sonarclud works.

@johnewing1 johnewing1 merged commit 6e9d6a6 into bosun-monitor:master May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants