-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#211] Case insensitive anchors #231
Conversation
@@ -65,6 +65,7 @@ ghc-options: | |||
- -Wno-all-missed-specialisations | |||
- -Wno-prepositive-qualified-module | |||
- -Wno-monomorphism-restriction | |||
- -optP-Wno-nonportable-include-path |
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.
In macOS, the project builds successfully but it shows an error message. It seems to correspond to a currently open issue for cabal, and adding this GHC option is a workaround for avoiding the message:
Is it ok if I include it in this PR?
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.
Okay, sounds fine.
Please leave a brief comment mentioning what this option achieves, and I would also like to see it in a separate commit as it is unrelated to the main logic.
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.
Done! Is this comment style appropriate for a stack file?
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.
Looks good 👍
A minor suggestion: it may be beneficial to also include the link where that solution was suggested, but it's really optional.
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.
Very good, thank you.
@@ -12,6 +12,7 @@ load '../helpers' | |||
@test "Git: not a repo" { | |||
cd $TEST_TEMP_DIR | |||
|
|||
export LANG=en_US | |||
run xrefcheck | |||
|
|||
assert_output --partial "fatal: not a git repository" |
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.
Force the git error message to be in English, so this test works also if anyone has other language configured.
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.
This is good 👍
Now please extract this change to a separate commit, so that someone viewing the commits history could see the motivation for this change. Feel free to put that new commit as the oldest, if this simplifies further work for you.
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.
Also, in that new commit, put description in the Problem/Solution
format.
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.
Good, thank you 👍
5b613dc
to
ba67d87
Compare
@@ -12,6 +12,7 @@ load '../helpers' | |||
@test "Git: not a repo" { | |||
cd $TEST_TEMP_DIR | |||
|
|||
export LANG=en_US | |||
run xrefcheck | |||
|
|||
assert_output --partial "fatal: not a git repository" |
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.
This is good 👍
Now please extract this change to a separate commit, so that someone viewing the commits history could see the motivation for this change. Feel free to put that new commit as the oldest, if this simplifies further work for you.
ba67d87
to
3aa4cef
Compare
d5abd72
to
00cb9dd
Compare
Problem: Some Markdown flavours such as the GitHub one are case insensitive regarding anchors, but our analysis is currently case sensitive and it produces false positives. Solution: Support case-insensitivity depending on the configured Markdown flavour. Apply this also to ambiguous and similar anchors detection.
Problem: We have a Golden test that expects an output in English and fails if a different language is configured. Solution: Configure explicitly the language before running the corresponding test.
00cb9dd
to
4763802
Compare
Problem: There is currently some problem in stack or cabal that produces a warning when building this project on case-insensitive systems. Solution: The current workaroud for it is to add the GHC option '-optP-Wno-nonportable-include-path'.
4763802
to
dd52970
Compare
Description
Problem: Some Markdown flavours such as the GitHub one are case insensitive regarding anchors, but our analysis is currently case sensitive and it produces false positives.
Solution: Support case-insensitivity depending on the configured Markdown flavour. Apply this also to ambiguous and similar anchors detection.
Related issue(s)
Fixes #211
✅ Checklist for your Pull Request
Ideally a PR has all of the checkmarks set.
If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).
Related changes (conditional)
Tests
silently reappearing again.
Documentation
Public contracts
of Public Contracts policy.
and
Stylistic guide (mandatory)