node-lintspaces icon indicating copy to clipboard operation
node-lintspaces copied to clipboard

Handle multiline spaced comments

Open Bartheleway opened this issue 1 year ago • 2 comments

This is my attempt to fix #297

To easily check the difference between old and new check, you can go to the code on line 107 and put in comment the insideComment = true flag so it never adapt to comment section. In such case it will fail like the old code.

It should handle all sorts of multiline spaced comments:

/**
 * Like this
 */

/**
* Or this
*/

/**
*Even this
*/

/**
 *And finally that
*/

Bartheleway avatar Oct 27 '24 15:10 Bartheleway

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.71%. Comparing base (f1a96e0) to head (5bef387). Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
+ Coverage   99.68%   99.71%   +0.02%     
==========================================
  Files           7        7              
  Lines         320      347      +27     
  Branches       90      108      +18     
==========================================
+ Hits          319      346      +27     
  Misses          1        1              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 27 '24 15:10 codecov[bot]

Hi @Bartheleway, thanks for this PR. I also wrote a comment on the issue. There is an ignores option that should handle this for you. With some already build-in ignores, you can turn off the detection of the indentation for such doc string comments, but also for other types/styles of comments. Please let me know if this solves your issue. I'll keep the PR open until then...

schorfES avatar Oct 31 '24 08:10 schorfES