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

Regression by v1.0.4: Commented-out heredocs #646

Closed
indocomsoft opened this issue Mar 29, 2019 · 5 comments
Closed

Regression by v1.0.4: Commented-out heredocs #646

indocomsoft opened this issue Mar 29, 2019 · 5 comments

Comments

@indocomsoft
Copy link

indocomsoft commented Mar 29, 2019

Environment

  • Credo version (mix credo -v): 1.0.4
  • Erlang/Elixir version (elixir -v):
Erlang/OTP 21 [erts-10.3.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.8.1 (compiled with Erlang/OTP 21)
  • Operating system: macOS 10.14.4 Mojave

What were you trying to do?

Running mix credo.

Expected outcome

Before 1.0.4, Credo does not report any error on files with commented out heredocs, https://github.com/source-academy/cadet/blob/master/lib/cadet/course/course.ex#L98.

Actual outcome

Since 1.0.4, Credo complains about trailing white-spaces:

  Code Readability
┃
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:205:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:189:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:188:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:175:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:157:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:150:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:138:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:125:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:124:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:100:1 #()
┃ [R] ↘ There should be no trailing white-space at the end of a line.
┃       lib/cadet/course/course.ex:99:1 #()

If I delete the commented out code in the file, credo 1.0.4 does not complain about anything. However, Credo 1.0.3 and before worked just fine even with the commented out code in the file.

I bisected the regression to commit 7a92ac2

rrrene pushed a commit that referenced this issue Mar 30, 2019
@rrrene
Copy link
Owner

rrrene commented Mar 30, 2019

I bisected the regression to commit 7a92ac2

Ha, great detective work! 👍

@rrrene
Copy link
Owner

rrrene commented Mar 30, 2019

@indocomsoft Thanks for reporting this 😀 It is now fixed on master.

You can try this by setting the Credo dep to

{:credo, github: "rrrene/credo"}

Please report back if your issue is solved! 👍

@indocomsoft
Copy link
Author

That seems to solve the issue. Thank you very much!

Will be looking forward to this being released on hex

@jiachen247
Copy link

@rrrene thanks for the hard work! when will this be released on hex?

@rrrene
Copy link
Owner

rrrene commented Apr 21, 2019

@indocomsoft @jiachen247 It's on hex now: https://hex.pm/packages/credo/1.0.5

Sorry for the delay! 👍

@rrrene rrrene closed this as completed Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants