-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Normalise and enforce script formatting/indentation #170
Comments
@thc202 could you please give more details regarding which scripts needs formating. |
The ones under the script type directories (e.g. |
I started to look at this based on spotless. I figured first I should look at implementing it for JavaScript. Using the eclipse web tool platform formatter fails (it does run but bombs with syntax errors). Stack & Console output$ ./gradlew spotlessApply
> Task :spotlessJs FAILED
Skipping 'C:\Users\thorin\Desktop\zap-ws\community-scripts\active\Cross Site WebSocket Hijacking.js' because it does not converge. Run `spotlessDiagnose` to understand why
Skipping 'C:\Users\thorin\Desktop\zap-ws\community-scripts\active\JWT None Exploit.js' because it does not converge. Run `spotlessDiagnose` to understand why
Skipping 'C:\Users\thorin\Desktop\zap-ws\community-scripts\active\User defined attacks.js' because it does not converge. Run `spotlessDiagnose` to understand why
Step 'eclipse wtp formatters - JS' found problem in 'extender\HTTP Message Logger.js':
Invalid JavaScript syntax for formatting.
java.lang.IllegalArgumentException: Invalid JavaScript syntax for formatting.
at com.diffplug.spotless.extra.eclipse.wtp.EclipseJsFormatterStepImpl.format(EclipseJsFormatterStepImpl.java:96)
at jdk.internal.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep.lambda$applyWithoutFile$1(EclipseWtpFormatterStep.java:64)
at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32)
at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:78)
at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:76)
at com.diffplug.spotless.Formatter.compute(Formatter.java:230)
... So then I thought to just use some of the default methods for formatting: |
Per title, might be asking too much given the number of languages...
The text was updated successfully, but these errors were encountered: