Open guettli opened 1 year ago
I can see an argument for skipping lines that contain //nolint
special comments. That is, I can imagine cases where just a //nolint
comment causes an undesired break. I'm not sure whether I think the change is justified or not, but it's worth considering.
But in this case, I think there's a much simpler fix than patching golines
: you can simply remove the (very long) second comment with the Reddit URL. That would probably leave you with a line short enough that golines
would ignore it.
@telemachus is there already a way to configure golines
, so that lines containing a special string get ignored?
If not, would you accept a patch?
@telemachus is there already a way to configure
golines
, so that lines containing a special string get ignored?
I don't think so.
If not, would you accept a patch?
I'm not the maintainer, but I can say that a similar request is labelled as an enhancement. That suggests to me that a patch would at least be considered, but I can't be sure.
Original line:
after running
golines
:I like the output of golines.
But now I get warnings from the linter:
I think it would be great if golines would skip lines containing "//nolint" by default.
What do you think?