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

Adding experimental rule for detecting first line blank in method block #461

Conversation

sowmyav24
Copy link
Contributor

This experimental rule addresses issue Issue #440.

In addition to checking for first line blank in a method block, it will check for any first blank line in code blocks of the method.Please let me know if the subsequent code blocks in the method need to be ignored from this check.

Due to this new rule, there were violations reported in the code. Have fixed them also.

@sowmyav24
Copy link
Contributor Author

The pipeline seems to fail with compilation error for the new test classes as it is unable to resolve the dependency. It runs fine in local though.

import com.pinterest.ktlint.test.format
import com.pinterest.ktlint.test.lint
import org.assertj.core.api.Assertions.assertThat
import org.testng.annotations.Test
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the wrong import. You need to use import org.junit.Test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the other tests use this import import org.testng.annotations.Test though

Copy link
Contributor

Choose a reason for hiding this comment

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

The do not anymore. Can you please rebase with master?
git rebase -i origin/master

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ! Got it.. Will fix it..

@jaredsburrows
Copy link
Contributor

Fix the import and then rebase with master. After that, you should be good.

@sowmyav24 sowmyav24 force-pushed the no-first-line-blank-in-method-block-rule branch 4 times, most recently from 9409c9f to 54bc41d Compare June 10, 2019 00:44
shashachu and others added 20 commits June 10, 2019 06:43
* Adding CHANGELOG for 0.33.0, updating various version references

* Adding another issue fixed in 0.33.0
And made command line options style consistent.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
* Update picoli to latest stable 3.9.6 release.

Changelog: https://github.com/remkop/picocli/blob/master/RELEASE-NOTES.md#-picocli-396
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>

* Replace shyiko with pinterest in command line messages.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
@sowmyav24 sowmyav24 force-pushed the no-first-line-blank-in-method-block-rule branch from f106346 to 3337ee9 Compare June 10, 2019 01:13
@sowmyav24 sowmyav24 closed this Jun 10, 2019
@sowmyav24 sowmyav24 deleted the no-first-line-blank-in-method-block-rule branch June 10, 2019 01:39
@sowmyav24 sowmyav24 restored the no-first-line-blank-in-method-block-rule branch June 10, 2019 01:39
@sowmyav24 sowmyav24 deleted the no-first-line-blank-in-method-block-rule branch June 10, 2019 01:39
@sowmyav24
Copy link
Contributor Author

Fixed all rebase issues and created a PR #474

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.

4 participants