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

non-zero exit code #70

Open
catena2w opened this issue Mar 14, 2018 · 5 comments
Open

non-zero exit code #70

catena2w opened this issue Mar 14, 2018 · 5 comments

Comments

@catena2w
Copy link

I run sbt scalastyle command end everything looks fine, while exit code of this task is 1 that fails our CI server.

pozharko@pozharko-desktop ~/Code/ergo/ergo $ sbt scalastyle
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /home/pozharko/Code/ergo/ergo/project
[info] Loading settings from build.sbt,lock.sbt ...
[info] Set current project to ergo (in build file:/home/pozharko/Code/ergo/ergo/)
[info] lock.sbt is up to date.
[info] scalastyle using config /home/pozharko/Code/ergo/ergo/scalastyle-config.xml
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:294:12: Avoid using return
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:311:12: Avoid using return
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:286:37: Avoid using null
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:286:51: Avoid using null
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:126:6: Cyclomatic complexity of 14 exceeds max of 10
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:126:6: Method is longer than 50 lines
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/crypto/Equihash.scala:268:6: Method is longer than 50 lines
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/ErgoApp.scala:74:6: Public method must have explicit type
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/FakePowScheme.scala:20:15: The number of parameters should not exceed 8
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinsEmission.scala:37:4: If block needs braces
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinsEmission.scala:38:9: If block needs braces
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:43: File line length exceeds 160 characters
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:25:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:26:4: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:27:4: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:28:4: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:29:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:30:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:31:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:32:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:33:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:34:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:35:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:37:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:38:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/emission/CoinEmissionPrinter.scala:43:58: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/PoWScheme.scala:24:6: The number of parameters should not exceed 8
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/PoWScheme.scala:35:6: The number of parameters should not exceed 8
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/PoWScheme.scala:107:15: The number of parameters should not exceed 8
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/mining/difficulty/RequiredDifficulty.scala:88:27: Avoid using return
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/settings/StateTypeReaders.scala: File must end with newline character
[error] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/ErgoReadersHolder.scala: expected start of definition, but was Token(VAL,val,596,val)
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/ErgoHistory.scala:95:14: Method is longer than 50 lines
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/ErgoHistory.scala:223:6: Method is longer than 50 lines
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/ErgoHistoryReader.scala:103:15: Cyclomatic complexity of 12 exceeds max of 10
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/storage/modifierprocessors/HeadersProcessor.scala:161:16: Cyclomatic complexity of 15 exceeds max of 10
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/storage/modifierprocessors/HeadersProcessor.scala:189:11: If block needs braces
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/storage/modifierprocessors/FullBlockProcessor.scala:38:16: Cyclomatic complexity of 13 exceeds max of 10
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/storage/modifierprocessors/FullBlockProcessor.scala:108:23: If block needs braces
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/history/storage/modifierprocessors/FullBlockProcessor.scala:38:16: Method is longer than 50 lines
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/local/ErgoMiner.scala: File must end with newline character
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/local/ErgoMiningThread.scala: File must end with newline character
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/local/TransactionGenerator.scala: File must end with newline character
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/local/ErgoStatsCollector.scala: File must end with newline character
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/Test.scala:27:2: Regular expression matched 'println'
[warn] /home/pozharko/Code/ergo/ergo/src/main/scala/Test.scala:28:2: Regular expression matched 'println'
[info] scalastyle Processed 81 file(s)
[info] scalastyle Found 1 errors
[info] scalastyle Found 45 warnings
[info] scalastyle Found 0 infos
[info] scalastyle Finished in 13 ms
[success] created output: /home/pozharko/Code/ergo/ergo/target
[error] Total time: 2 s, completed Mar 14, 2018, 10:44:40 AM
pozharko@pozharko-desktop ~/Code/ergo/ergo $ $?
1: command not found
@matthewfarwell
Copy link
Member

The Scalastyle task has a non-zero exit code when it finds an error. You have one error, which looks like a parse error. If you don't want scalastyle to fail on error, set the scalastyleFailOnError setting to false.

@khatkar
Copy link

khatkar commented May 17, 2018

[error] /home/pozharko/Code/ergo/ergo/src/main/scala/org/ergoplatform/nodeView/ErgoReadersHolder.scala: expected start of definition, but was Token(VAL,val,596,val)

Scalastyle is failing with above error.

@Ric137k
Copy link

Ric137k commented Apr 10, 2019

Do you have a for instance a Seq in your code where the last entry is followed by a , ?

@rulle-io
Copy link

rulle-io commented Sep 9, 2019

Yes, I have a similar issue and the reason was a List() with a trailing comma (last symbol, not followed by an element).
However, it is pity that error log print doesn't contain any location info (line number or function name).

@edgartanaka
Copy link

Such a terrible error message.

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

No branches or pull requests

6 participants