Github user HyukjinKwon commented on the pull request:
https://github.com/apache/spark/pull/12382#issuecomment-210358749
@andrewor14 Hm.. I tried to add a rule but I realised (or I think) it
cannot find perfectly by a static way. One of the problems I met was below:
For example, there is a class `GraphOps` and at line 74,
```scala
graph.aggregateMessages(ctx => { ctx.sendToSrc(1); ctx.sendToDst(1) }, _ +
_,
TripletFields.None)
}
```
In this case, this should not be the error case since `(` and `)` exists
for other arguments ` _ + _` and `TripletFields.None`.
In order to check this, it should be able to check `,` after `ctx => {
ctx.sendToSrc(1); ctx.sendToDst(1) }`. In order to skip `ctx => {
ctx.sendToSrc(1); ctx.sendToDst(1) }`, we need to skip the range between `{`
and `}` which might have nested `{`, `}` and `,`. AFAIK, it is impossible for
regex in theory but it looks possible in practical by recursive regular
expression but it looks scalastyle does not support this.
Maybe i am not smart enough but this was just my conclusion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]