SwiftLint: how to configure rule severity for a rule with warning and error configurations - swift

I would like to configure the Swiftlint cyclomatic_complexity rule to always have the severity level of warning.
Here are the approaches I have tried in the .swiftlint.yml.
cyclomatic_complexity: warning
cyclomatic_complexity:
severity: warning
Both of these yield the same result. Namely, upon running swiftlint, before linting it prints the following error.
Invalid configuration for 'cyclomatic_complexity'. Falling back to default.
How do you configure the severity of this rule for swiftlint, so that it only generates warnings and not errors?

# .swiftlint.yml
cyclomatic_complexity: 20

Try this in .swiftlint.yml, it works for me:
cyclomatic_complexity:
warning: 10
error: 20

Related

Getting error Liquibase validation failed because checkum has changed in GITHUB Actions

I am getting the error Liquibase checksum validation failed.
Error
Unexpected error running Liquibase: Validation Failed:
1 change sets check sum
changelog.sql::3::snowflake was: 8:f97afb605f986bcfcc0d3e4ecf5208e6 but is now: 8:a10040290479269659939671e8a14db0
AnyIdea how to debug this issue in GITHUB Action and Runner.
delete the record for checksum value for that I was getting the error and It is resolved now.

Facing issue in deploying pods. its working fine if i only use affinity rule but after involving antiaffinity rules it is throwing error

error validating "helm/confluent-for-kubernetes/confluent-platform-6.1.0/iris-streaming-connect.yaml":
error validating data:
ValidationError(Connect.spec.podTemplate.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution):
invalid type for io.confluent.platform.v1beta1.Connect.spec.podTemplate.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution:
got "map", expected "array";
if you choose to ignore these errors, turn validation off with --validate=false

TwinCat Sys Manager: INIT to PREOP' failed! Error: 'check product code'

We have a running TwinCat project on a PC. After the restart of the machine, the following error occurs when i try to run the project in "Run Mode" or try Online Reset.
Errors:
Type Server (Port) Timestamp Message
Error (65535) 'Term 29 (EK1100)' (1006): state change aborted (requested 'PREOP', back to 'INIT').
Error (65535) 'Term 29 (EK1100)' (1006): 'INIT to PREOP' failed! Error: 'check product code'. Device 'EL1014-XXXX-XXXX' found and 'EK1100-0000-0018' expected.
Warning (65535) 'Term 33 (EL1014) (1010) - Term 34 (EL1014) (1011)' Communication interrupted
Warning (65535) 'Term 35 (EK1100) (1012) - Term 43 (EL1014) (1020)' Communication interrupted
Tree structure
Online State
The EK1100 and EL1014 were changed, but the error stays. Please, can you suggest a fix for this problem?
Very likely the problem is that the configured ethercat tree structure does not match the one found.
As you can see the Ethercat master expects 'EK1100-0000-0018' but finds 'EL1014-XXXX-XXXX'
Rescan you ethercat tree from the system manager and see if the configured and the found hardware-configuration matches.
Correct your ethercat configuration if you notice errors and reactivate the project.
Specifically take a look at TERM29.
There you can probably find the source of your error.
Either a wrong card has been swapped or the ethercat connection is faulty there.

in wordpress, a valid callback for cp_admin_init and _canonical_charset

I'm using WordPress 3.5 with child-theme of Twenty Eleven 1.5. Suddenly I'm getting following Warning,
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
I'm using following plugins:
download-manager 2.3.9
wordpress-seo 1.4.7
wp-pagenavi 2.83
Some more points:
1) If I'm giving mysite.com it's giving above 2 line warning. If I give www.mysite.com, the following line also include,
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-includes/pluggable.php on line 876
2) If I give mysite.com/wp-admin/ or www.mysite.com/wp-admin/, It's giving 1st warning and 3rd warning.
3) If I goto www.mysite.com/wp-login.php, It's giving following 5 warning.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 368
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_authenticate_spam_check' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
4) If I give correct username and password, it's not going to login. giving following problem,
ERROR: Invalid username or incorrect password.
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
I'm trying to find solution. I can't. Can any-one help me?
This sounds like a corrupted install. So you have a few options to fix this:
Attempt to get logins operational again and doing an upgrade though the wp-admin: Explained Below.
Do a manual Update: http://codex.wordpress.org/Updating_WordPress#Manual_Update
But First: Make a Backup
Please be sure to backup your install! Before proceeding: http://codex.wordpress.org/WordPress_Backups
Getting Logins Working: Masking the symptoms
First I would disable debugging output because that should fix most of these issues. When a warning occurs in Wordpress, PHP starts writing the response body and closes the header section of the response. This means that whenever Wordpress tries to add another header after the original warning was raised, PHP will raise another warning:
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
So if we disable debugging then we should be able to mask the symptoms. This is a quick patch for a larger problem that we will have to solve with an in-place upgrade
To Disable Debugging
Ensure that the following constants exist and are set correctly is in your wp-config.php file
define('WP_DEBUG', false);
and
define('WP_DEBUG_DISPLAY', false);
Now you should be able to login to your site as an administrator without errors.
Disable your Plugins
Disable all your plugins in Plugins -> Installed Plugins This is imperative so that we can make sure that the update goes smoothly.
Do an Update
Go to Dashboard -> Updates and click either Update Now or Re-install Now
Reactivate your Plugins
Reactivate all your plugins in Plugins -> Installed Plugins and update them if necessary.
That's It
That's the process for reinstalling Wordpress. The key here is that you have Debugging enabled on a production site which is not good. You should always have WP_DEBUG and WP_DEBUG_DISPLAY set to false in a production environment.

Unknown log level for Akka stdout

On my play project I'm getting unknown akka.stdout-loglevel WARNING error. What does this mean? Could this be about Turkish locale?
Put -Duser.language=en in your ~/.activator/activatorconfig.txt file.
WARNING is a valid loglevel in akka Logging.It works with both std and external loggers. You have probably got spaces after WARNING as it seems. like "WARNING "