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

NPE is ASTNode.squeezeSpaces method #500

Merged
merged 8 commits into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class CommentsFormatting(private val configRules: List<RulesConfig>) : Rule("kdo
}

private fun checkSpaceBetweenPropertyAndComment(node: ASTNode, configuration: CommentsFormattingConfiguration) {
if (node.treeParent.firstChildNode != node) {
if (node.treeParent.firstChildNode != node && node.treeParent.elementType != FILE) {
kentr0w marked this conversation as resolved.
Show resolved Hide resolved
if (!node.treePrev.isWhiteSpace()) {
// if comment is like this: val a = 5// Comment
COMMENT_WHITE_SPACE.warnAndFix(configRules, emitWarn, isFixMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.cqfn.diktat

/*
* Copyright (c) Your Company Name Here. 2010-2020
*/

/**
* @property name
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package test.smoke.src.main.kotlin
/*
* Copyright (c) Your Company Name Here. 2010-2020
*/

class HttpClient {
var name: String
Expand Down