lint

Android Studio not showing dangerous permissions warnings

ぐ巨炮叔叔 提交于 2019-12-10 15:59:50
问题 I have an Android Studio project and I'm trying to update it to Android 23. I changed the target to 23 in build.gradle and I was expecting Android Studio or lint to show warnings in the code blocks that need to use dangerous permissions. But neither Android Studio or Lint are showing the warnings. Does anybody know what could be the reason of this problem? I'm using Android Studio 1.4.1. Thanks in advance. 来源: https://stackoverflow.com/questions/33611120/android-studio-not-showing-dangerous

Is my in-class decorator not Pythonic enough or PyCharm not smart enough in lint warning?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 14:29:53
问题 I want to define a decorator within a class. I don't want to define it as a separated, independent function, for this decorator is specifically for this class and I want to keep the correlated methods together. The purpose of this decorator is to check some prerequisites, especially the database connection, SSH connection, etc., which are held by member variables, are still available. If not, the decorated function won't be called and some error reporting and clean-up works will be done. I

Adding Custom Lint Rules

↘锁芯ラ 提交于 2019-12-10 12:55:55
问题 I am following the tutorial on this(http://tools.android.com/tips/lint-custom-rules) page. I am stuck at the step: lint --show MyId I get the following error message, any ideas? Could not load custom rule jar file /Users/me/.android/lint/CustomLintRule.jar java.lang.NoSuchMethodError: com.android.tools.lint.detector.api.Issue.create(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/android/tools/lint/detector/api/Category;ILcom/android/tools/lint/detector/api/Severity;Ljava/lang

Any Tools to Catch Silly Mistakes in C Code?

笑着哭i 提交于 2019-12-09 15:10:19
问题 I had a nasty typo that wasted my time and my colleague's time, it was something like this: for (i = 0; i < blah; i++); // <- I had a semi-colon here, that's the bug! { // Some awesome logic here } First of all, it's very embarrassing, second thing, I should never repeat this. I'm relatively new to C. In Java, I guess I can use FindBugs to catch errors like these, what tool should I use for C code? Lint? 回答1: Yes, PC-Lint is probably the best tool available. 回答2: In addition to Lykathea's PC

Android Lint Plugin - set custom warning / error that should be checked

旧街凉风 提交于 2019-12-09 12:11:30
问题 My question is if there is a way to add to lint plugin a custom check which it should warn me about before building a version. For example I want it to check all Cursor, InputStream objects in my code if they are closed, or to check my code for //TODO: , //FIXME: . Any ideas if there is any kind of way to do that, or even not with Lint Plugin? Thanks in advance! 回答1: Yes, you can add custom checks; see http://tools.android.com/tips/lint/writing-a-lint-check and http://tools.android.com/tips

Lint tool for actionscript?

你说的曾经没有我的故事 提交于 2019-12-09 02:19:49
问题 Are there any lint tools available for actionscript? One source would be ideal, but anything is welcome. My team is starting to adopt more a more rigorous style guide (where "more rigorous" means "existant"), and I think a linter would help us all adhere more easily to the style rules we've agreed on. I'm not above writing my own, but I'd like to see what else is out there first. A quick search on Google reveals nothing (at least so far). 回答1: If you're dealing with Flex, take a look at

avoid lint when gradle execute check

南笙酒味 提交于 2019-12-08 22:52:57
问题 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. 回答1: gradle build -x lint Source: Gradle User Guide : Excluding Tasks 回答2: 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

clang-format breaks lint annotations

蹲街弑〆低调 提交于 2019-12-08 15:07:23
问题 We use lint in our codebase at work for C/C++, I'm trying to start integrating clang-format in my workflow as well. Unfortunately, lint occasionally requires annotations to ignore a specific check, either of the format: /*lint -[annotation] */ or //lint -[annotation] Specifically, if there's a space between the opening token for the comment and 'lint', it doesn't recognize it as an annotation directive. Unfortunately, the default settings I have for clang-format see that as an error and

cmake clang-tidy (or other script) as custom target

泪湿孤枕 提交于 2019-12-08 15:00:10
问题 I am trying to create a custom cmake target for clang-tidy, to lint my project. The source folder looks something like this: src/scripts/run-clang-tidy.py src/.clang-tidy src/... So far my plan was to copy both these files to the build directory with a custom command: add_custom_command( OUTPUT run-clang-tidy.py .clang-tidy COMMAND cp ${CMAKE_SOURCE_DIR}/scripts/run-clang-tidy.py ${CMAKE_SOURCE_DIR}/.clang-tidy ${CMAKE_CURRENT_BINARY_DIR}) I now want to call run-clang-tidy.py in the build

Issue performing lint command in Android Studio

耗尽温柔 提交于 2019-12-08 06:45:28
问题 I am currently working on a android application which has CI/CD implementation. Everything was working as expected for gradle version 2.0.1. I was able to run ./gradlew clean build command but recently I have upgraded Application to gradle version 3.4.1. I am able to run the application on Android Device and Android Emulator. However When I am running the same command in terminal build process is getting haulted while doing lint analysis. I was using android studio version 3.0.1 with gradle