-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
#188, but fixed #191
#188, but fixed #191
Conversation
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
==========================================
- Coverage 78.83% 77.65% -1.18%
==========================================
Files 4 4
Lines 1063 846 -217
==========================================
- Hits 838 657 -181
+ Misses 225 189 -36
Continue to review full report at Codecov.
|
Would it be easy to add a test that ensures this is ok? |
Added a test that goes over all lower-case ASCII strings up to length 5. Takes a minute or two, but that should be fine. Of course it doesn't really test correctness though... It did find a bug in my code, so that's good I guess :P |
@odow, would it be possible for you to manually test this PR and see if this is ok w.r.t the issues you had with the earlier one? |
I can update the compat for the formatter once this lands |
I don't see how the compat for JuliaFormatter is related here (since the buggy PR got reverted and a new patch version tagged) |
hmm maybe not required since if they update or fresh install it would get the more recent version of the dependency right? |
Yes, and we should yank the buggy one for completeness sake. |
Confirmed that it works: julia> using JuliaFormatter
julia> format("src/lp_sensitivity.jl")
true
(@v1.6) pkg> st
Status `~/.julia/environments/v1.6/Project.toml`
[98e50ef6] JuliaFormatter v0.15.8
[0796e94c] Tokenize v0.5.18 `https://github.com/JuliaLang/Tokenize.jl.git#load-time` |
This fixes the
simple_hash
function introduced in #188. The new implementation just pushes all characters into anInt128
(sosimple_hash("if") == 508
because'f'-'a' == 05
and'i'-'a' == 08
), which works fine because keywords are at most 10 characters long at the moment.Fixes #189.