Menu
  • HOME
  • TAGS

Elixir: lint for confirming that every function has type sepcification

lint,elixir

There is an Erlang compiler switch, +warn_missing_spec, which does this, but I'm having trouble getting it to work with Elixir at the moment, I think there is a bug with it's parsing of the ELIXIR_ERL_OPTS environment variable which is converting +warn_missing_spec into -warn_missing_spec which isn't a valid compiler option. I'm...

DemoActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details

java,android,multithreading,android-gradle,lint

You are probably using an older version of the appcompat library. Can you show the import statements that this class uses? Based on the newer version of appcompat, use import android.support.v7.app.ActionBarDrawerToggle; instead of import android.support.v4.app.ActionBarDrawerToggle; Also, reference the new version of appcompat in build.gradle dependencies { compile 'com.android.support:appcompat-v7:21.0.+' } More...

How to update project using gradle automatically when executing sonar-runner?

android,sonarqube,android-gradle,lint,sonar-runner

Simply add a new line to module build.gradle file, just after sonarRunner task declaration: sonarRunner { tasks.sonarRunner.dependsOn build // <- This new line sonarProperties { ...

Lint possible access / creation out of bounds pointer

c++,lint

sizeof returns the number of bytes, not the elements, so I guess the error is valid. Use sizeof(my_array) / sizeof(my_array[0]) to get the element count.

Lint a Swift cocoa pod with SSZipArchive dependency

swift,cocoapods,lint

I couldn't wait for a better solution, my temporary solution was to create a zipArchive class which talks to the SSZipArchive pod in objc. Not pretty and not ideal but works for now. I hope they update it soon. Note: you would import zipArchive.h in your bridging-header file and not...

Sass lint task in Gulp - Code quality

sass,less,lint,gulp,recess

There was no resources for linting SCSS in gulp yet so, with the help of my colleague Juanfran, we can finally lint our sass code with this gulp-scss-linter Gulp plugin to validate .scss files with scss-lint...

How to initialize a object in the constructor in C++

c++,constructor,initialization,lint

If you don't want to write a custom constructor for the Numbers class you can also simply initialize the fields of the member object in your Test constructor: Test::Test() { numbers_.a = 0; numbers_.b = 0; } ...

What am I doing wrong in this lint error suppression attempt? And is there a better way?

c++,lint,pc-lint

OK, answering my own question, the following seems to work: ftDCB.ByteSize = /*lint -e(1924) C-style cast */ FT_BITS_8; ...

Why gradle lint think ellipsis character “…” is more readable than “…”?

android,gradle,lint

It's about good typography. The actual ellipsis character is almost always preferred to the approximation of having three dots. In some fonts, three dots in a row just have too much space in between while the actual ellipsis character looks nice: the font designer can control the appearance of the...

creating JSON object without using a list

json,lint

Objects have named keys. Arrays are a list of members. Replace the value of "schools" with an object. Change [] to {}....

Modify coffeelint rule on code by comment

coffeescript,lint,coffeelint

Here is the syntax for that. # coffeelint: disable=max_line_length object: attr: "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" # coffeelint: enable=max_line_length ...

Customize lint with gradle

android,gradle,lint

The lint command just executes Android´s Lint CLI (which is a sort of stand-alone-tool which comes with the Android SDK). But the Android Gradle Plugin (the one you apply with apply plugin: 'com.android.application' in your project´s build.gradle) automatically adds certain lint tasks. So there is no need to write own...

trying to php lint check with maven antrun plugin

php,maven,lint,antrun

Solved it using AntRun plugin in the end, moved away from 'resultproperty' to using 'errorproperty' with append. If there are any errors, it will continue checking all files, appending further errors until all the files have been checked. After a few other checks, it then reaches a report phase where...

How to look up a method within the compiler given the type and a name?

rust,lint

I got it! The problem was that I trying to get a DefId for the type, not for the impl. Going through cx.tcx.inherent_impls.get(id) gave me a vec of DefIds for inherent impls, which I could then query via the impl_items lookup I already implemented. Look in rust-clippy/src/len_zero.rs for an example...

DrawAllocation: Memory allocations within drawing code

android,performance,lint

This Lint warning appears when you are allocating memory in a method that is invoked frequently to draw something on the screen. Allocating and deallocating memory can be avoided by allocating the memory up front, which leads to increased performance. Code example. For example, we have some class that extends...

SonarRunner: Unable to find file warning

android,android-studio,sonarqube,lint,sonar-runner

This warning is shown because the xml file is not indexed by the platform. As a consequence the android lint plugin tries to report your issue but the file cannot be found on the server side. This is a current limitation of the platform that should be addressed very soon....

Bypass ESLint's `no-unused-var` for Should in a Mocha test

javascript,mocha,lint,should.js,eslint

Well, doesn't seem like there's an elegant solution to this, but I think I came up with a close approximation: I just added a single line to my before() hook, stating simply should;. Since this evaluates to the should object, or in other words a "truthy" value, it can be...

Creating a custom Lint Java Detector

java,android,android-gradle,lint,android-lint

Documentation on this is really rare, so don't worry if you haven't found more. The best way to start into custom lint rule development is actually to adapt existing rules like mentioned here [1]. Here are the sources of Android's default set of rules: [2]. Pick one that implements JavaScanner...

What does “(…) interpreted as grouped expression” mean?

ruby,lint

The warning is (...) interpreted as grouped expression And it means exactly what it says: in Ruby, parentheses can be used for three purposes, expression grouping, parameter lists and argument lists. This warning is emitted when Ruby thinks that you want an argument list but wrote a grouped expression instead....

How to find out what type a rustc::middle::ty::Ty represents?

plugins,rust,lint,internals

You need use with_path on the DefId. You will be provided an iterator over PathElems which you must consume. The following is a rough sketch, but should give you an array of Names if you tweak it a bit. if let ty_enum(did, ..) = ty.sty { tcx.with_path(did, |iter| iter.map(|elem| elem.name())).collect::<Vec<Name>>;...

Why some Android code works on previous API level than it should?

java,android,eclipse,lint

Actually this surprised me a lot. I went to their repository to see actually what the hell is that. So I found that they add some methods but hide it in the documentation using @hide javadoc annotation until it's fully tested or until they remember to unhide it. @hide When...

how to avoid “Octal literals are not allowed in strict mode” with createWriteStream

node.js,lint

I don't have a node installation at hand, but looking at sources it seems that they allow strings as well: mode : '0644' Does it work?...

ESLint: How to set .eslintrc to recognize 'require'?

javascript,intellij-idea,jslint,lint,eslint

The problem is not with ESLint. If you look closely at your message, it says JSHint. Since you're trying to configure ESLint, simplest solution would be to disable or remove JSHint plugin form your IDE. If you still want to use JSHint along with ESLint, you can do the following:...

Building a Cocoapod with Swift and dependency on Objective-C framework

ios,swift,cocoapods,google-maps-sdk-ios,lint

I finally found another thread on SO dealing with similar problems: Linker errors in a Swift project with Google Maps for iOS added via CocoaPods. It appears that the errors were due to a combination of bad Podspec file (on the Google Maps iOS SDK side), and bugs in Cocoapods...

Android lint enable checks with gradle

android,android-gradle,lint

From Lint Support As of version 0.7.0, you can run lint for a specific variant, or for all variants, in which case it produces a report which describes which specific variants a given issue applies to. You can configure lint by adding a lintOptions section like following. You typically only...

angularjs constant code lint

angularjs,ionic-framework,constants,lint

Check jshint documentation jshint.com/docs. In case you know why you don't want to put a semicolon there (which would be a good practice) try to put some ignore directives around it: A directive for telling JSHint to ignore a block of code. // Code here will be linted with JSHint....

Saving any file in eclipse giving me following error:

android,eclipse,eclipse-plugin,eclipse-adt,lint

In Window > Preferences > Android > Lint Error Checking, uncheck "When saving files check for errors".

MissingTranslation for default language ( “…” is not translated in “en”)

android,android-resources,lint

I don't know where the en comes from, but if I define the language of my default resources in the xml file like following <resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en"> the error disappears... Probably, I just guess, some gradle imports have the en folder......

CSS Lint ignore all IE6 and IE7 based errors

css,lint,csslint

To answer my own question, in the end I figured how to do what I need: { "user": { "debug": false, "delay": 0.25, "error_color": "D02000", "gutter_theme": "Packages/SublimeLinter/gutter-themes/Danish Royalty/Danish Royalty.gutter-theme", "gutter_theme_excludes": [], "lint_mode": "background", "linters": { "csslint": { "@disable": false, "args": [], "box-sizing": false, "errors": "", "excludes": [], "ignore": [ "outline-none",...

Grunt recess - how to check less

gruntjs,less,lint,recess

Correct answer but unfortunately no solution: "Well, in short: recess does not really lints Less code but instead it actually checks the CSS compiled from it. Hence it doesn't complain of missing ; and blank lines simply because compiled CSS do not have those. (And answering your next question: No,...

Proper way to handle Android Studio's NullPointerException lint warning

java,android,nullpointerexception,android-studio,lint

I doubt this question can be answered conclusively, as it's a matter of opinion. Or at least I believe so -- an opinion too. :) I understand you want "0 warnings" (a very laudable goal) but there's probably not a "one size fits all" issue. That said... Things I believe...

Resolving resource values in custom lint rule

android,lint,android-lint

The general problem with the resolution of values is, that they depend on the Android runtime context you are in. There might be several values folders with different concrete values for your key @dimen/standard_anim_factory, so just that you are aware of. Nevertheless, AFAIK there exist two options: Perform a two...

Sonar: Create new rule for Android Lint

android,xml,xpath,sonarqube,lint

Accidentally I have found how to do this. Steps: Log in as administrator or other user with sufficient rights. Look for XPath rule for the language, XML in this case. Press Create button near "Custom Rules" text and fill form. Do not forget to activate this custom rule in your...

No extra Boolean cast in JavaScript

javascript,boolean,warnings,lint

Ok, I've done some research myself since asking this and actually stumbled upon some very similar questions (with answers) to the double negative trick in JavaScript. Here and here I found some explanation of the need of double boolean negative trick itself. To cut the long story short it's like...

Objective C Static Analysis with custom linter rules?

ios,objective-c,static-analysis,lint

Try to use OCLint. It has possibility to create custom rules. It is alternative to standard Clang analyzer.

Per-project options in Visual Lint?

c++,static-analysis,lint,pc-lint

Answering my own question: In Visual Lint, go to Tools / Options / PC-lint. In there, there's a "Configuration" field, containing the name of a *.lnt file (like C:\Lint\std.lnt) that applies to anything you do in PC-lint via Visual Lint. Edit that file to contain the line: options.lnt Without specifying...

Incorrect Android Lint warning on Unused Resources

java,android,eclipse,lint

Lint often produces false positives on unused resources. You can set them to Information or Ignore instead of Warning (Window/Preferences/Android/Lint Error Checking/Performance/UnusedResources). ...

“LintError” found processing android lint report

android,android-studio,sonarqube,lint,sonar-runner

I should have taken a deeper look into lint-results.xml file. The error is fully explained there. In my case: <?xml version="1.0" encoding="UTF-8"?> <issues format="4" by="lint 24.1.2"> <issue id="LintError" severity="Error" message="No `.class` files were found in project &quot;debug&quot;, so none of the classfile based checks could be run. Does the project...

RedPhone Build Failed

gradle,lint

The build can be completed by adding the following to build.gradle android { lintOptions { abortOnError false } } Tried the solution by Scott Barta and Jared Burrows at How to fix error running ./gradlew check connectedCheck, after update AndroidStudio to 0.4.0? and it worked....