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

Suppress LineLength for Track 1 #5276

Merged
merged 1 commit into from
Sep 6, 2019
Merged

Conversation

conniey
Copy link
Member

@conniey conniey commented Sep 6, 2019

Suppress LineLength checkstyle rule for Track 1 libraries.

@conniey conniey requested a review from mssfang as a code owner September 6, 2019 16:11
@conniey conniey self-assigned this Sep 6, 2019
@conniey
Copy link
Member Author

conniey commented Sep 6, 2019

/azp run java-docs

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@conniey
Copy link
Member Author

conniey commented Sep 6, 2019

/azp run java - docs

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@conniey
Copy link
Member Author

conniey commented Sep 6, 2019

/azp run java - keyvault - data

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@conniey
Copy link
Member Author

conniey commented Sep 6, 2019

/azp run java - eventhubs - data

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@conniey conniey merged commit 9411e74 into Azure:master Sep 6, 2019
<suppress checks="LineLength" files=".*[/\\]com[/\\]azure[/\\]storage[/\\]"/>

<!-- Suppress LineLength for Track 1 libraries. -->
<suppress checks="LineLength" files=".*[/\\]com[/\\]microsoft[/\\]"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<suppress checks="LineLength" files=".*[/\\]com[/\\]microsoft[/\\]"/>
<suppress checks="LineLength" files=".*[/\\]com[/\\]microsoft[/\\].*"/>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required. The regex will match still.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just want the regex to result in an isMatch when we evaluate a file name with it. The .* isn't needed to basically take anything else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To double check, the suppression line here basically does the logic. It looks for any match to that regex, then returns true or false if a match is found.

https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressFilterElement.java#L195

<!-- Suppress lineLength for Storage on Preview 3. https://github.com/Azure/azure-sdk-for-java/issues/5125 -->
<suppress checks="LineLength" files=".*[/\\]com[/\\]azure[/\\]storage[/\\]*"/>
<!-- Suppress LineLength for Storage on Preview 3. https://github.com/Azure/azure-sdk-for-java/issues/5125 -->
<suppress checks="LineLength" files=".*[/\\]com[/\\]azure[/\\]storage[/\\]"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<suppress checks="LineLength" files=".*[/\\]com[/\\]azure[/\\]storage[/\\]"/>
<suppress checks="LineLength" files=".*[/\\]com[/\\]azure[/\\]storage[/\\].*"/>

@conniey conniey deleted the suppress-line-length branch September 6, 2019 17:15
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.

3 participants