lint

Webpack config has an unknown property 'preLoaders'

て烟熏妆下的殇ゞ 提交于 2019-11-30 04:26:55
I'm learning webpack from scratch. I've learned how to link javascript files with require. I'm bundling and minifying my js files and i'm listening for changes with watch. I'm setting up loaders to convert my sass files to css. But when I try to setup a linting process with jshint-loader, i'm running into issues. module: { preLoaders: [ { test: /\.js$/, // include .js files exclude: /node_modules/, // exclude any and all files in the node_modules folder loader: "jshint-loader" } ], loaders: [ { test: /\.scss$/, loader: 'style-loader!css-loader!sass-loader' }, { test: /\.js$/, loader: 'babel

avoid lint when gradle execute check

做~自己de王妃 提交于 2019-11-30 01:28:43
could someone tell me a way to avoid executing "lint" each time I run in gradle check? I've defined in build.gradle lintOptions { quiet true } However, it keeps doing this task. The problem is that it takes ages each time I have to do a check. gradle build -x lint Source: Gradle User Guide : Excluding Tasks rciovati You can skip it using adding -x lint when you run the check task: ./gradlew check -x lint If you want to skip it permanently you can add this to your build.gradle before apply plugin: 'com.android.application' : tasks.whenTaskAdded { task -> if (task.name.equals("lint")) { task

Clean up unused Android permissions

喜你入骨 提交于 2019-11-30 01:15:43
If I wanted to research how and where permissions [requested in the Mainfest.xml] were used in an Android app for the purposes of removing them is there an easy way of doing this? Does lint or findbugs offer some sort of support for tracking permissions used/abused in a project? I came from the future to save your lives. Here (in the future), LINT does check for missing permissions as you can see on LINT checks . So, go to your AndroidManifest.xml and remove all tags <uses-permission> using Android permissions (meaning, don't delete permissions that belong to your app, such as UA_DATA and C2D

Is there a simple CLI Java linter? [closed]

跟風遠走 提交于 2019-11-29 19:47:51
I've been trying to find a Java linter capable of running on the CLI that is separate from Eclipse that I can call as a commit hook for git or from our automated build script. Does such a thing exist? Ideally it needs to check for unused imports and variables, that style guidelines are followed, exceptions are used properly, etc. Though some subset of those features would be better that what we have now - nothing! mikeslattery Findbugs for finding existing bugs. VERY GOOD! PMD for finding patterns that can lead to bugs (e.g. unused variables) Checkstyle to enforce coding standards and

Difference between running lint via Android Studio menu and gradlew command-line

拟墨画扇 提交于 2019-11-29 16:50:51
问题 When I run the following on a command line: ./gradlew -lint I get different results than if I choose the following menu option within Android Studio. Analyze->Inspect Code... Can anyone explain this? Is this normal? Should a prudent developer run both in order to find all potential problems with his/her project? 回答1: In Android Studio you can customize what inspections are run via Preferences > Inspections; you may have some Lint inspections disabled, and not all run by default. Android

“auth_client_using_bad_version_title” is translated here but not found in default locale

☆樱花仙子☆ 提交于 2019-11-29 16:10:16
问题 I'm forced to use Google Play service (I need Location Service). So, after I wrote all code and tested application on device, i tried to export signed application. And all I got is Lint errors like (Even I changed MissingTranslation erros in Lint from fatal to warning) "auth_client_using_bad_version_title" is translated here but not found in default locale And this error repeats in all "values-" folders I know that I can disable lint checking before exporting application. But is there any way

Context of lint.xml and inspection profile

房东的猫 提交于 2019-11-29 12:24:43
问题 In Android Studio there is the lint.xml configuration and ./idea/inspectionProfiles/.xml manageable via Settings => Editor => Inspections . I understand lint.xml is used by lint command line tool and the inspection profile is used by Android Studio IDE. The official documentation is here. I also found this post How is lint integrated with IntelliJ inspections in Android Studio? and this post Android lint on command-line missing issue groups (versus options available in Android Studio). This

Check string indentation?

耗尽温柔 提交于 2019-11-29 07:49:25
I'm building an analyzer for a series of strings. I need to check how much each line is indented (either by tabs or by spaces). Each line is just a string in a text editor. How do I check by how much a string is indented? Or rather, maybe I could check how much whitespace or \t are before a string, but I'm unsure of how. Gizmo To count the number of spaces at the beginning of a string you could do a comparison between the left stripped (whitespace removed) string and the original: a = " indented string" leading_spaces = len(a) - len(a.lstrip()) print(leading_spaces) # >>> 4 Tab indent is

Is JSLint available for offline use?

筅森魡賤 提交于 2019-11-29 05:34:03
问题 I'd like to use JSLint, but I am wary of tools that have access to my unfiltered source code. Is there an offline version or is there another similar tool that does " lint error checking" for JavaScript offline? Edit: One with a GUI and that shows you a styled list of errors, instead of a command line interface? 回答1: If you like the JSLint web interface, you can do File > Save Page As... and Save as type: Web Page, complete (in Firefox, doing it in Internet Explorer may be slightly different)

“is translated here but not found in default locale” error in strings.xml with translatable=“false”

点点圈 提交于 2019-11-29 04:27:26
问题 Here is my values\strings.xml (the default file) and everything is self explanatory: My question(s): How can it be "not found in default locale" if I am editing the default locale (values\strings.xml)? How can it be a lint translation error if I set translatable="false" ? In the values-pl\strings.xml (and values-ru, values-iw folders as well) the strings don't exist even? it shouldn't anyway. I can't seem to understand why I don't get the error for the Russian string. (I would show the values