Skip to content

Instantly share code, notes, and snippets.

private static boolean isAloneOnLine(Details details) {
final DetailAST rcurly = details.rcurly;
final DetailAST lcurly = details.lcurly;
final int lcurlyNo = lcurly.getLineNo();
final int rcurlyNo = rcurly.getLineNo();
boolean result = false;
if (lcurlyNo != rcurlyNo) {
final int tokenLambda = details.lcurly.getParent().getType();
if (tokenLambda == TokenTypes.LAMBDA) {
result = rcurly.getPreviousSibling() == null
@romani
romani / gist:19318e2dfc2b74b64df6d4388a166d05
Created March 5, 2017 01:51
RegexpMultiline - empty lines after left curly brace
$ cat config.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<module name="RegexpMultiline">
<property name="format" value="\{\n\s*\n"/>
export WERCKER_STEP_ROOT="/pipeline/script-000c6f41-a833-4cee-b342-9456dd2c7f97"
export WERCKER_STEP_ID="script-000c6f41-a833-4cee-b342-9456dd2c7f97"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-000c6f41-a833-4cee-b342-9456dd2c7f97/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-000c6f41-a833-4cee-b342-9456dd2c7f97/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-000c6f41-a833-4cee-b342-9456dd2c7f97/artifacts"
source "/pipeline/script-000c6f41-a833-4cee-b342-9456dd2c7f97/run.sh" < /dev/null
Cloning into 'contribution'...
Testing Checkstyle started
export WERCKER_STEP_ROOT="/pipeline/script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61"
export WERCKER_STEP_ID="script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61/artifacts"
source "/pipeline/script-0ebbeb80-cd8b-4704-8ab7-11e0f845ce61/run.sh" < /dev/null
Cloning into 'contribution'...
Testing Checkstyle started
This file has been truncated, but you can view the full file.
2018-02-28T02:42:41Z started 'distelli' with pid 17913
Cloning into '/distelli/tasks/d2902-350021/repo'...
HEAD is now at 695363f config: bump spontbugs to 3.1.1
Distelli ToolKit 3.66 (+34 2826f1efcdb4)
Copyright (C) 2015 Distelli Inc.
Running `distelli push -t d2902:350021 -m config: bump spontbugs to 3.1.1 --enable-docker -f distelli-manifest.yml` in /build
Build:
SKIP_CI=false
Switching to Oracle JDK8 (java-8-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-8-oracle
Linux 5f4566d26849 3.19.0-75-generic #83~14.04.1-Ubuntu SMP Thu Nov 10 10:51:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle 8.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
Build 'Open-source projects :: Checkstyle :: IDEA Inspections Pull Request' #8718, branch '5560/head'
Started 2018-02-28 02:45:33 on 'ubuntu-16.04-v168-50574-i-05fe119d670abd39c' by 'Git'
Finished 2018-02-28 02:46:44 with status FAILURE 'Error message is logged (new); exit code 1 (new)'
VCS revisions: 'https://github.com/checkstyle/checkstyle - merge' (Git): 695363fdbe0ea61165b050b1a8a8511fe431713f (branch 'refs/pull/5560/head')
TeamCity URL https://teamcity.jetbrains.com/viewLog.html?buildId=1334148&buildTypeId=Checkstyle_IdeaInspectionsPullRequest
TeamCity server version is 2017.2.3 EAP (build 50999), server timezone: UTC
[02:43:32]E: bt831 (3m:12s)
[02:43:32]i: TeamCity server version is 2017.2.3 EAP (build 50999)
[02:45:32] : The build is removed from the queue to be prepared for the start
cloning contribution
HEAD is now at 280bac0 Isssue #290: Initial support pieces for spelling CI
Retrieve w
Clean up from previous run
Run w
Review results
New misspellings found, please review:
A'o
aaffaa
AANNOTATION
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:5
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:29
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:46
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:47
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:48
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:50
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule32packagestate/InputLineLength.java:57
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/InputLineLength.java:5
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/InputLineLength.java:29
Description Resource Path Location Type
Unknown Unknown Java Exception Breakpoint
Unknown Unknown Java Exception Breakpoint
Syntax error on token ";", delete this token InputImportOrderStaticGroupSeparated.java /checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/imports/importorder line 5 Java Problem
Syntax error on token ";", delete this token InputRegressionJava8Class1.java /checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/grammars line 3 Java Problem
The declared package "" does not match the expected package "com.puppycrawl.tools.checkstyle.asttreestringprinter" InputAstTreeStringPrinterAttributesAndMethodsJavadoc.java /checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/asttreestringprinter line 1 Java Problem
The declared package "" does not match the expected package "com.puppycrawl.tools.checkstyle.asttreestringprinter" InputAstTreeStringPrinterJavaAndJavadoc.java /checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/asttreestringpr