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

fix: not treat form feed as line break (#443) #444

Merged
merged 2 commits into from
Mar 1, 2025

Conversation

tomoto
Copy link
Contributor

@tomoto tomoto commented Dec 7, 2024

This is the suggested fix for issue #443. Please see it for the exact description about what this fix is trying to address.

The issue is caused by splitting the code into lines using str.splitlines built-in function, which has a different set of line separators than the editors. (See https://docs.python.org/3/library/stdtypes.html#str.splitlines ) This fix is using our own splitlines function instead to make the line separation rule more consistent with the editors.

Now fortls can return the correct information regardless of the form feed characters in the code.
image

@tomoto tomoto requested a review from gnikit as a code owner December 7, 2024 16:50
@tomoto
Copy link
Contributor Author

tomoto commented Dec 7, 2024

@gnikit I see "Some checks were not successful" message. If there are anything I should do, please let me know. Thank you for your time!

@gnikit
Copy link
Member

gnikit commented Feb 28, 2025

Hey @tomoto I am rebasing your branch, and let's see what the checks show now. I'll have a look at the PR a bit later.

@gnikit gnikit force-pushed the fix/form-feed-issue branch from 0998931 to ed52bc1 Compare February 28, 2025 13:55
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.26%. Comparing base (bb3f6dc) to head (50d72b3).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #444      +/-   ##
==========================================
+ Coverage   88.19%   88.26%   +0.06%     
==========================================
  Files          35       35              
  Lines        4795     4797       +2     
==========================================
+ Hits         4229     4234       +5     
+ Misses        566      563       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomoto
Copy link
Contributor Author

tomoto commented Feb 28, 2025

Thank you! Please take your time :)

@gnikit gnikit force-pushed the fix/form-feed-issue branch from ed52bc1 to 92e5d7a Compare March 1, 2025 11:31
@gnikit gnikit merged commit 9a86506 into fortran-lang:master Mar 1, 2025
17 checks passed
@gnikit
Copy link
Member

gnikit commented Mar 10, 2025

This should now be available in v3.2.0

@tomoto tomoto deleted the fix/form-feed-issue branch March 10, 2025 10:54
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

Successfully merging this pull request may close these issues.

fortls gets confused when the code includes form feed (’\f’, ASCII 0xC)
2 participants