Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

comment-format: whitelist //region comments #4609

Merged
merged 2 commits into from Apr 2, 2019
Merged

comment-format: whitelist //region comments #4609

merged 2 commits into from Apr 2, 2019

Conversation

01e9
Copy link
Contributor

@01e9 01e9 commented Mar 26, 2019

PR checklist

  • Addresses an existing issue: fixes #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Continuation of #197

JetBrains IDE screencast https://streamable.com/4sxnz

CHANGELOG.md entry:

[enhancement] comment-format rule now whitelists //region comments generated by JetBrains IDE

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @01e9! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@adidahiya
Copy link
Contributor

Hi @01e9, can you please provide more information around this code change? There is no associated issue and I don't know much about JetBrains IDE. I need to know a lot more context before I can consider this PR.

@01e9
Copy link
Contributor Author

01e9 commented Mar 26, 2019

@adidahiya JetBrains IDEs have this feature in menu "Code > Surround with > region" https://streamable.com/4sxnz
I use it in Js, PHP, C++. Only TSLint complains about missing space between // and region

@01e9 01e9 changed the title Skip //region (without #) Allow //region without space Mar 26, 2019
@adidahiya
Copy link
Contributor

Which versions of JetBrains IDE does this apply to? You'll have to update the code comment on the previous line too.

@01e9
Copy link
Contributor Author

01e9 commented Mar 26, 2019

I tried to find some JetBrains docs about this comment but without success.
I am using it for almost one year already. So it's not something new added in latest version.

@VincentLanglet
Copy link
Contributor

VincentLanglet commented Apr 2, 2019

https://blog.jetbrains.com/phpstorm/2012/03/new-in-4-0-custom-code-folding-regions/

As you can see there are two custom folding items: “<editor-fold..>” for NetBeans-like style and “region..endregion” for VisualStudio style.

@adidahiya adidahiya changed the title Allow //region without space comment-format: whitelist //region comments Apr 2, 2019
@adidahiya adidahiya merged commit 5dbb3bb into palantir:master Apr 2, 2019
@oleg-mtr
Copy link

oleg-mtr commented Apr 3, 2019

How soon will this be included in release?

Now I fix manually the //region comments generated by IDE (add space // region) to prevent TsLint warning. I would like to stop doing that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants