Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Lint maintainers #37

Merged
merged 2 commits into from
Jul 30, 2017
Merged

Lint maintainers #37

merged 2 commits into from
Jul 30, 2017

Conversation

kytrinyx
Copy link
Member

Now that we have a maintainers.json file, we're inevitably going to find that we delete fields without deleting the final comma. Or that someone adds the file to a track with a single maintainer, and makes maintainers an object rather than an array.

This includes the maintainers.json in the linting process.

@kytrinyx kytrinyx requested review from nywilken and robphoenix July 29, 2017 19:08
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

This looks good some minor liniting issues regards the exported types/func.

"os"
)

type MaintainerConfig struct {
Copy link
Contributor

@nywilken nywilken Jul 30, 2017

Choose a reason for hiding this comment

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

Missing top level comment for exported types.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I totally forgot to run the linter. My bad!

AvatarURL string `json:"avatar_url"`
}

func NewMaintainerConfig(path string) (MaintainerConfig, error) {
Copy link
Contributor

@nywilken nywilken Jul 30, 2017

Choose a reason for hiding this comment

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

Same linting issue as exported types; missing comment.


func NewMaintainerConfig(path string) (MaintainerConfig, error) {
mc := MaintainerConfig{}
if _, err := os.Stat(path); os.IsNotExist(err) {
Copy link
Contributor

@nywilken nywilken Jul 30, 2017

Choose a reason for hiding this comment

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

Very nice!

"github.com/stretchr/testify/assert"
)

func TestBrokenMaintainerConfig(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this test pattern. Short, simple, and clearly showcases how linting for the maintainers file works.

@kytrinyx
Copy link
Member Author

I've added the linting. Merging this in. Thanks @nywilken

@kytrinyx kytrinyx merged commit eb648bb into exercism:master Jul 30, 2017
@kytrinyx kytrinyx deleted the lint-maintainers branch July 30, 2017 19:17
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