Skip to content

Lint pkg/term/windows package#16060

Merged
tiborvass merged 1 commit intomoby:masterfrom
vdemeester:14756-lint-pkg-term-windows
Sep 3, 2015
Merged

Lint pkg/term/windows package#16060
tiborvass merged 1 commit intomoby:masterfrom
vdemeester:14756-lint-pkg-term-windows

Conversation

@vdemeester
Copy link
Member

Linting pkg/term/windows as part of #14756 🐹. It was almost already completely linted except for the . import that golint does not like.

I was going to do it with the rest but I don't have a ready-to-use windows at hand to try out wether I broke it or not, so I'm shamelessly using the hard worker Janky for that 😉.

🐸

/cc @jhowardmsft @icecrime @tiborvass @LK4D4
Signed-off-by: Vincent Demeester vincent@sbr.pm

@vdemeester vdemeester force-pushed the 14756-lint-pkg-term-windows branch 3 times, most recently from bde5109 to 6df55fe Compare September 3, 2015 20:22
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester vdemeester force-pushed the 14756-lint-pkg-term-windows branch from 6df55fe to 3409de9 Compare September 3, 2015 20:25
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why this has been aliased?

Copy link
Member Author

Choose a reason for hiding this comment

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

By convention, packages are given lower case, single-word names; there should be no need for underscores or mixedCaps.

Emacs wasn't happy with the - and I assumed golint would not like it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I don't think the go lexer can handle - in identifiers. Probably we shouldn't have called it go-ansiterm, but it's too late to fix that. This alias is perfectly reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vdemeester if golint is not complaining i would keep it not aliased import "github.com/Azure/go-ansiterm"

@jstarks what matters is the package name (in this case: package ansiterm) not the import path.

@lowenna
Copy link
Member

lowenna commented Sep 3, 2015

LGTM, but not tested (the docker integration-cli won't exercise this). Just the query about the odd-looking alias.

@lowenna
Copy link
Member

lowenna commented Sep 3, 2015

@jstarks

@jstarks
Copy link
Contributor

jstarks commented Sep 3, 2015

LGTM. I suspect that the . import was added when go-ansiterm was split from winterm, but I'm not sure.

It also seems strange that golint thinks that a legitimate go feature (import with .) is unacceptable. Aren't the go developers and gofmt opinioned enough already? :) But again, I don't really have a strong opinion here.

@tiborvass
Copy link
Contributor

@vdemeester nvm I can't wait :P LGTM

tiborvass added a commit that referenced this pull request Sep 3, 2015
@tiborvass tiborvass merged commit 07d2eae into moby:master Sep 3, 2015
@vdemeester vdemeester deleted the 14756-lint-pkg-term-windows branch September 4, 2015 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants