Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output format has some problem. We should change output format. #3

Closed
aimof opened this issue Mar 30, 2019 · 1 comment · Fixed by #4
Closed

Output format has some problem. We should change output format. #3

aimof opened this issue Mar 30, 2019 · 1 comment · Fixed by #4
Labels
good first issue Good for newcomers

Comments

@aimof
Copy link
Contributor

aimof commented Mar 30, 2019

I try godolint to this Dockerfile.

FROM go:1.12.1

RUN apt-get update
RUN apt-get upgrade
RUN apt-get clean

ADD LICENSE /root/LICENSE

(It's non-sense but break some rules)
Output is this.

#4 DL3005 Do not use apt-get upgrade or dist-upgrade. 
 #3 DL3009 Delete the apt-get lists after installing something. 
 #7 DL3020 Use COPY instead of ADD for files and folders.

There are some problem of output format.

  • They are sorted by DL numbers not by lines.
  • There are a space 2 rows and below.

It seems to be from

# line 110
_, _ = fmt.Fprint(cli.OutStream, strings.Trim(fmt.Sprintf("%s", rst), "[]"))

So we should change output format.

aimof added a commit to aimof/godolint that referenced this issue Mar 30, 2019
Output format is strange so format it.

close zabio3#3
@aimof aimof mentioned this issue Mar 30, 2019
@zabio3
Copy link
Owner

zabio3 commented Mar 31, 2019

Hi @aimof, thank you for reporting the issue! 😄

Thank you for pointing out, I was able to confirm the problem.

Since changing the lint check to asynchronous processing, the order of messages to be output was not guaranteed. Also, it was a known problem that unnecessary space was included in the second and subsequent lines.

I appreciate the pull request as I thought I needed to address these issues 👍

@zabio3 zabio3 closed this as completed in #4 Mar 31, 2019
@zabio3 zabio3 added the good first issue Good for newcomers label Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants