-
Notifications
You must be signed in to change notification settings - Fork 691
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
Warn about inconsistent indentation #8975
Conversation
8d6bd99
to
6944cb0
Compare
Cabal-tests/tests/ParserTests/regressions/decreasing-indentation.check
Outdated
Show resolved
Hide resolved
Cabal-tests/tests/ParserTests/regressions/decreasing-indentation.check
Outdated
Show resolved
Hide resolved
Cabal-tests/tests/ParserTests/regressions/decreasing-indentation.check
Outdated
Show resolved
Hide resolved
6944cb0
to
7a458a6
Compare
I had to adjust lexer slightly as BOM and NBSP where throwing source locations a bit off causing cascading indentation warnings. |
4a7d23e
to
b27e6df
Compare
147ed3e
to
732de92
Compare
This helps disabling individual packages (e.g. cabal-testsuite)
19e5c4d
to
2c407cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to adjust lexer slightly as BOM and NBSP where throwing source locations a bit off causing cascading indentation warnings.
This sounds a bit worrying. Have you seen the discussion at #8896? Don't we step on each others toes here?
At the very least, the Lexer change sounds like something that should go into a separate commit.
This is affect of using indentOfAtLeast method: any indentation greater than current offset is fine. That behavior is desirable to parsing multiline field contents, but it is a bit surprising for fields, which we expect to be aligned. Such insonsistency seems to be always a mistake, and it's easy to fix once a machine points it out.
2c407cf
to
37edda4
Compare
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. Please kindly set one of the merge labels.
I don't have (and don't want) write permissions to this repository. |
Why isn't this merged? There isn't conflict? |
@mergify rebase |
❌ Pull request can't be updated with latest base branch changesMergify needs the author permission to update the base branch of the pull request. |
@phadej on it. Sorry for the delay. |
@mergify refresh |
✅ Pull request refreshed |
@mergify refresh |
✅ Pull request refreshed |
@mergify rebase |
❌ Pull request can't be updated with latest base branch changesMergify needs the author permission to update the base branch of the pull request. |
Oh dear. |
@phadej: we have technical problems; is it fine if I squash the PR when merging? If not, we'd probably need to open a new PR and move it there, but it's work and an indirection. |
@Mikolaj Oleg was very clear about it: he won't allow updates. We'll have to manually copy his branches to our repository and open new PRs using those copies. I am afraid it'll be hard to find volunteers to do this monkey job. |
@ulysses4ever: I thought the merge+squash button would be a cheap way out. Wouldn't it work? In any case, @ffaf1 did it in a more principled way, so let's merge his PR. |
@Mikolaj unless I'm missing something, Mergify is completely strangled by not being able to update the branch. Perhaps, you could work around Mergify by clicking GitHub buttons for squash and merge, see the screenshot. But I find it a bit dangerous to apply both merge approaches (GH and Mergify) on one repository concurrently. |
Yes, the button is what I meant. If the button works, then mergify does not cut in. Unless I'm missing something. However, we lose the separate commits. |
Mergify may be surprised that, half-way merging some other PR into |
Huh, I'd hope git would cope fine and then mergify or github trying to merge something absurd would be rebuked by git. OTOH, if they promptly retry with enough |
Merged in #9051. |
This is an effect of using
indentOfAtLeast
method: any indentation greater than current offset is fine.That behavior is desirable to parsing multiline field contents, but it is a bit surprising for fields in sections, which we expect to be aligned.
Such insonsistency seems to be always a mistake, and it's easy to fix once a machine points it out.