A persistent warning when using //nolint:godox in Golang - linter

WARN [runner/nolint] Found unknown linters in //nolint directives: godox todo: fix once roles are in place
This warning keeps coming up when I am building my Golang project. What does this mean?
What is the meaning of unknown linters here?
I already have godox enabled in my config file for the linter but this warning doesn't seem to be going away.

found a solution to this.
I was using a nolint:godox on a todo comment and it was formatted as follows.
//nolint:godox TODO: blah blah..
Which will throw out a warning. So we need to separate the comment from the actual nolint statement.
The correct way to do it is as follows:
//nolint:godox //TODO: blah blah..

Related

How to provide custom Function/Line/File information to manually invoked Crashlytics Crashes

I have a set of custom functions that's basically wrappers to logging and assertion behaviours. In particular there is an assert class function and a fatal class function. Both which generates a log and then proceed to assert() or fatal().
In my particular case, I have Crashlytics installed. So the generated log message will also go to CLSLogv(). The assert()/fatal() then generates a Crashlytics crash report. These all work fine.
My problem is in the Crashlytics dashboard, it basically just gives me my wrapper function/file/line information as my Issue Title and Description. In essence then every single assertion event, despite of differing causes/callers, will look the same on the Crashlytics Dashboard. Invoking Crashlytics.sharedSession().crash() instead of assert()/fatal() does not help either, as crash() does not allow any arguments for function/line/file.
Is there any other ways of doing this? Or is this essentially an enhancement request to Crashlytics/Fabric/Google? Thanks!
Swift allows you to use these special values: #file, #function, #line and #column. Using them with CLSLogv() may help you find the exact places your code went through:
CLSLogv("I was here: %#.%#, %i:%i", getVaList([ #file, #function, #line, #column ]))
Result in Crashlytics dashboard:
1 | 2017-09-05T08:32:22.088Z | I was here: /Users/.../SettingsTableViewController.swift.viewDidLoad(), 27:82
Hope this helps :).

Parse error: syntax error, unexpected ''supplier_rule'' (T_CONSTANT_ENCAPSED_STRING), expecting function (T_FUNCTION)

Resetting CleanURL Prestashop Module has lead to HTTP ERROR.
Parse error: syntax error, unexpected ''supplier_rule''
(T_CONSTANT_ENCAPSED_STRING), expecting function (T_FUNCTION) in
/home/mbawithf/public_html/mbawithfun.cu.cc/override/classes/Dispatcher.php
on line 4
Now I can not even access backend. I just tried to deleting module from FTP... still didn't work. Any solution?
Delete the Dispatcher file in override folder, or comment the function that includes that line.
Don't forget to delete the cache/class_index.php so Prestashop recreates that file.
PrestaShop tries to manually copy class methods to \override\classes* files, and sometimes the lines miss-match or the line break are wrong, and the end result is incorrectly copied lines which cause syntax errors. That happens both on installation and uninstallation. Basically, you then have to manually fix/remove syntax errors from overridden class files.
What you need is to log on to FTP server and edit this files - fix syntax error.
EDIT:
If you had uninstalled the module, then you should replace the contents of this file with:
class Dispatcher extends DispatcherCore
{
}
Please check that the are no public function ... because if there is, it means that other modules may have inserted their functions here. If there isn't any, then it's safe to reset the file with the code above.

paper-datatable Port to Dart with custom_element_apigen: does not working

I am trying port to Dart this nice paper-datatable implementation using custom_element_apigen.
Some problems occurred and sought to find solutions according to my understanding (perhaps included more problems!).
However, still an error is thrown and not been able to move on. I need some help about how port to Dart!!! I will briefly describe the steps, errors and solutions that gave and a link to source code of the project test:
1) I following the steps, accord to https://github.com/dart-lang/custom-element-apigen. I had problems on Windows, but I got to resolve after (custom_element_apigen: gives an error importing paper-datatable to Dart)
2) apigen.yaml used with custom_element_apigen does not clear how to configuration.
I used the "trial-and-error" method until no more error occur. It was so:
files_to_generate:
- paper-datatable\paper-datatable.html
- paper-datatable\paper-datatable-column.html
- paper-datatable\paper-datatable-edit-dialog.html
- paper-datatable\paper-datatable-card.html
- paper-datatable\paper-datatable-styles.html
- paper-datatable\datatable-icons.html
files_to_load:
- package:polymer_elements/src/paper-material/paper-material.html
- package:polymer_elements/src/iron-ajax/iron-request.html
- package:polymer_elements/src/iron-ajax/iron-ajax.html
- package:polymer_elements/src/iron-form/iron-form.html
- package:polymer_elements/src/iron-meta/iron-meta.html
- package:polymer_elements/src/iron-icon/iron-icon.html
- package:polymer_elements/src/iron-iconset-svg/iron-iconset-svg.html
- package:polymer_elements/src/paper-ripple/paper-ripple.html
- package:polymer_elements/src/paper-checkbox/paper-checkbox.html
- package:polymer_elements/src/neon-animation/animations/opaque-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-in-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-out-animation.html
- package:polymer_elements/src/paper-tooltip/paper-tooltip.html
- package:polymer_elements/src/iron-resizable-behavior/iron-resizable-behavior.html
- package:polymer_interop/src/js/debug/src/lib/template/templatizer.html
Some paths imports were wrongs on paper-datatable*.(html and dart) files. p.e. : import 'packages\polymer_interop\src\js\debug\src\lib\template\templatizer.dart'; I changed to import 'package:polymer_interop/src/behaviors/templatize.dart';
on paper_datatable_column.dart.
I changed reserved Dart word default to defaultx on get defaultx => jsElement[r'default']; and set defaultx(value) { jsElement[r'default'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} instructions on paper_datatable_column.dart and paper_datatable_card.dart;
After the following erros were occuring in several polymer componentes. P.e.: Failed to execute 'registerElement' on 'Document': Registration failed for type 'iron-meta'. A type with that name is already registered.
I changed all paths into paper-datatable*.* files to get official package (pub.dartlang) of the polymer and polymer elements. P.e.: <link rel="import" href="paper_icon_button_nodart.html"> to <link rel="import" href="../../packages/polymer_elements/paper_icon_button_nodart.html">. The register problem does not occur more!
But now, the following problem is occuring and I don't know how to resolve it: On debug console appear the following message: Uncaught SyntaxError: Unexpected token =>. The web app works on browser, but the paper-datatable does not appear.
My complete test project (webstorm) is on https://github.com/supermuka/paper_datatable_port_dart_demo
Is there some wrong in how I used Dart custom_element_apigen (and apigen.yaml)? Did I some things wrong on paths changed? I also need to change some other source?
Thanks!
Most likely you just created a syntax error when editing the files. That being said there are options built in to do most of the things you manually did, and that also makes it easier to update in the future.
omit_imports: This is used on individual items in the files_to_generate section. It can be used to get rid of the templatizer import entirely, resolving issue #3. See example here.
name_substitutions: This is used on individual items in the files_to_generate section, and allows you to rename fields. You can use this to resolve issue #4, example here.
stubs_to_generate: This option allows you to generate stubs which actually import elements from a different package, this should resolve issue #5 you listed above. See example usage here.
Hopefully that helps, and applying those options will just resolve your issues.

Doxygen: Can a \post start with \ref or any other Special Command?

I'm getting an error from Clang when using CLANG_WARN_DOCUMENTATION_COMMENTS on a doxygen block that contains following line
\post \ref something == somethingelse
The warning says "Empty paragraph passed to '\post' command"
Is this a valid use of \post?
If it is, does anyone know if there's a way to suppress this warning without disabling all documentation warnings?
Cheers.

Grails - Including CAS client JAR dependency causes StackOverflowError, logging conflict?

If I include compile "org.jasig.cas.client:cas-client-core:3.3.3" in my BuildConfig.groovy, I get a stack overflow as seen below. If I change compile to runtime the error goes away, but I do have dependencies at compile time as well as runtime.
It looks like some kind of circular reference related to logging, and just getting a stack dump like this isn't helpful. How would I fix it?
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
at org.apache.log4j.Category.<init>(Category.java:52)
at org.apache.log4j.Logger.<init>(Logger.java:35)
at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:59)
at org.apache.log4j.LogManager.getLogger(LogManager.java:42)
at org.slf4j.impl.GrailsSlf4jLoggerFactory.getLogger(GrailsSlf4jLoggerFactory.java:43)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
at org.apache.log4j.Category.<init>(Category.java:52)
at org.apache.log4j.Logger.<init>(Logger.java:35)
at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:59)
at org.apache.log4j.LogManager.getLogger(LogManager.java:42)
at org.slf4j.impl.GrailsSlf4jLoggerFactory.getLogger(GrailsSlf4jLoggerFactory.java:43)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
| Error Error executing script RefreshDependencies: null
You may have multiple versions of log4j-over-slf4j in your dependency chain. If you run 'grails dependency-report runtime', you will see a list of libs that your app sucks in.
Using transitive=false will exclude all dependencies of the lib, but you could try 'exclude "log4j-over-slf4j"' as a more focused exclude if you have multiple slf4j versions in your dependency chain. E.g.,
compile("org.jasig.cas.client:cas-client-core:3.3.3") {
exclude "log4j-over-slf4j"
}
adding transitive=false made the error go away:
compile("org.jasig.cas.client:cas-client-core:3.3.3") {
transitive=false
}
I'm not clear what I needed to exclude specifically, or how anyone could have figured that out from the stack overflow.

Resources