Retrolambda: Lint crashes when using lambda expressions with retrolambda

You can use a special lombok version with lint which does not whine about Java 8 features. buildscript { repositories { jcenter() … } dependencies { classpath ‘com.android.tools.build:gradle:<version>’ classpath ‘me.tatarka:gradle-retrolambda:<version>’ classpath ‘me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2’ } // Exclude the version that the android plugin depends on. configurations.classpath.exclude group: ‘com.android.tools.external.lombok’ } This way you can keep running lint on … Read more

JSLint: control comments (selective ignore)

Put /*ignore jslint start*/ before and /*ignore jslint end*/ after the code to be ignored. Ex: function ignore(){ /*ignore jslint start*/ var x; var y; /*ignore jslint end*/ } Or export JsLint settings, define your IgnoreErrorStart/ IgnoreErrorEnd symbols and import. Edit Some folks may confuse this answer with JSHint. In that case, use these: /*jshint … Read more

Waiting asynchronously for Navigator.push() – linter warning appears: use_build_context_synchronously

Short answer: It’s NOT SAFE to always ignore this warning, even in a Stateless Widget. A workaround in this case is to use the context before the async call. For example, find the Navigator and store it as a variable. This way you are passing the Navigator around, not passing the BuildContext around, like so: … Read more

Android Lint: how to ignore missing translation warnings in a regional locale string file that purposely only overrides some default translations?

A nice way to disable MissingTranslations check is to add the option in module specific build.gradle file . android { lintOptions{ disable ‘MissingTranslation’ } //other build tags } If the strings are not present in locale specific Strings file, it will take the strings from the default file which generally is strings.xml.

One var per function in JavaScript?

The problem is that, whether you realise it or not, javascript invisibly moves all the var declarations to the top of the function scope. so if you have a function like this var i = 5; function testvar () { alert(i); var i=3; } testvar(); the alert window will contain undefined. because internally, it’s been … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)