-
Notifications
You must be signed in to change notification settings - Fork 1
ci: demo Checkstyle in static analysis #478
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
base: main
Are you sure you want to change the base?
Conversation
0d0f87c to
63070bc
Compare
| } | ||
| // Map everything else in settings/ to META-INF/ | ||
| else { | ||
| else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck> reported by reviewdog 🐶
'else' construct must use '{}'s.
1b8652c to
32ea546
Compare
jahia-ci
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
checkstyle
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 80 in 32ea546
| for (Bundle bundle : getJavascriptModules()) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 81 in 32ea546
| engine.disableJavascriptModule(bundle); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 82 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 83 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 85 in 32ea546
| @Override |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 86 in 32ea546
| public void bundleChanged(BundleEvent event) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 87 in 32ea546
| try { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 88 in 32ea546
| Bundle bundle = event.getBundle(); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 89 in 32ea546
| if (isJavascriptModule(bundle)) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 90 in 32ea546
| if (event.getType() == BundleEvent.STARTED) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 91 in 32ea546
| engine.enableJavascriptModule(bundle); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 92 in 32ea546
| for (Registrar registrar : registrars) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 93 in 32ea546
| registrar.register(bundle); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 94 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 95 in 32ea546
| } else if (event.getType() == BundleEvent.STOPPED) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 96 in 32ea546
| for (Registrar registrar : registrars) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 97 in 32ea546
| registrar.unregister(bundle); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 98 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 99 in 32ea546
| engine.disableJavascriptModule(bundle); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 100 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 101 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 102 in 32ea546
| } catch (Exception e) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 103 in 32ea546
| logger.error("Cannot handle event {}", event.toString(), e); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 104 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 105 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 107 in 32ea546
| public List<Bundle> getJavascriptModules() { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 108 in 32ea546
| return Arrays.stream(engine.getBundleContext().getBundles()) |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 109 in 32ea546
| .filter(bundle -> bundle.getState() == Bundle.ACTIVE && isJavascriptModule(bundle)) |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 110 in 32ea546
| .collect(Collectors.toList()); |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 111 in 32ea546
| } |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 113 in 32ea546
| public boolean isJavascriptModule(Bundle bundle) { |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 114 in 32ea546
| return bundle.getBundleId() != engine.getBundleContext().getBundle().getBundleId() && |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Line 115 in 32ea546
| bundle.getHeaders().get(BUNDLE_HEADER_JAVASCRIPT_INIT_SCRIPT) != null; |
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| return bundle.getBundleId() != engine.getBundleContext().getBundle().getBundleId() && | ||
| bundle.getHeaders().get(BUNDLE_HEADER_JAVASCRIPT_INIT_SCRIPT) != null; | ||
| } | ||
| private static final Logger logger = LoggerFactory.getLogger(JavascriptModuleListener.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| bundle.getHeaders().get(BUNDLE_HEADER_JAVASCRIPT_INIT_SCRIPT) != null; | ||
| } | ||
| private static final Logger logger = LoggerFactory.getLogger(JavascriptModuleListener.class); | ||
| private GraalVMEngine engine; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| } | ||
| private static final Logger logger = LoggerFactory.getLogger(JavascriptModuleListener.class); | ||
| private GraalVMEngine engine; | ||
| private final Queue<Registrar> registrars = new ConcurrentLinkedQueue<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| private GraalVMEngine engine; | ||
| private final Queue<Registrar> registrars = new ConcurrentLinkedQueue<>(); | ||
|
|
||
| @Reference(cardinality = ReferenceCardinality.MANDATORY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| private final Queue<Registrar> registrars = new ConcurrentLinkedQueue<>(); | ||
|
|
||
| @Reference(cardinality = ReferenceCardinality.MANDATORY) | ||
| public void setEngine(GraalVMEngine engine) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| engine.enableJavascriptModule(bundle); | ||
| } | ||
|
|
||
| context.addBundleListener(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| } | ||
|
|
||
| context.addBundleListener(this); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| context.addBundleListener(this); | ||
| } | ||
|
|
||
| @Deactivate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
| } | ||
|
|
||
| @Deactivate | ||
| public void deactivate(BundleContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
|
|
||
| @Deactivate | ||
| public void deactivate(BundleContext context) { | ||
| context.removeBundleListener(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
Line contains a tab character.
Description
...
Checklist
Source code
Tests
Tip
Documentation to guide the reviews: How to do a code review