lint

How to exclude a folder from tslint?

Deadly 提交于 2019-12-01 03:49:19
I like to exclude the test folder form linting with tslint in vscode. So I have placed an exclude into my tslint.json config file. Unfortunately the exclude statement is not working. Does any one know how to set the exclude up? { "exclude": "tests/**/*.ts", "rulesDirectory": ["node_modules/tslint-microsoft-contrib"], "rules": { "export-name": true, ... } } Latest update: this can now be set in in tslint.json (the following configuration works with tslint 5.11) { "linterOptions": { "exclude": [ "bin", "build", "config", "coverage", "node_modules" ] } } MBushveld It seems that this is an open

Lint tool for actionscript?

你离开我真会死。 提交于 2019-12-01 02:30:41
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). If you're dealing with Flex, take a look at FlexPMD . FlexPMD should actually be named As3PMD. I mean you can run FlexPMD against a pure AS3 project, not

How to exclude a folder from tslint?

拟墨画扇 提交于 2019-12-01 01:32:24
问题 I like to exclude the test folder form linting with tslint in vscode. So I have placed an exclude into my tslint.json config file. Unfortunately the exclude statement is not working. Does any one know how to set the exclude up? { "exclude": "tests/**/*.ts", "rulesDirectory": ["node_modules/tslint-microsoft-contrib"], "rules": { "export-name": true, ... } } 回答1: Latest update: this can now be set in in tslint.json (the following configuration works with tslint 5.11) { "linterOptions": {

How can I find all RELEVANT hard coded strings in Android Studio?

会有一股神秘感。 提交于 2019-11-30 23:28:52
A few flavors of this question have been asked before, but I don't understand how the answers to them are satisfactory for large projects. My goal here is to find any hardcoded strings in my application that need to be localized, so I do the following: Select the directory I want to run the hardcoded strings check from in the project hierarchy Navigate to Analyze-->Run inspection by name... Select "Hard coded strings" With the "Directory" radio button selected, click OK to run the check At this point, I get about 3500 hits, 2500 of which are logging statements. I run a sed command to remove

How can I find all RELEVANT hard coded strings in Android Studio?

元气小坏坏 提交于 2019-11-30 18:56:52
问题 A few flavors of this question have been asked before, but I don't understand how the answers to them are satisfactory for large projects. My goal here is to find any hardcoded strings in my application that need to be localized, so I do the following: Select the directory I want to run the hardcoded strings check from in the project hierarchy Navigate to Analyze-->Run inspection by name... Select "Hard coded strings" With the "Directory" radio button selected, click OK to run the check At

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

假装没事ソ 提交于 2019-11-30 11:17:11
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? 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 Studio can also run a great number of non-Lint inspections. You are running two different tools. The command: $ .

Check string indentation?

↘锁芯ラ 提交于 2019-11-30 08:50:33
问题 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. 回答1: 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 = "

Context of lint.xml and inspection profile

巧了我就是萌 提交于 2019-11-30 08:27:06
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 answer has a good example of lintOptions{ } block in build.gradle. Yet there is some information

Where can I find an actively developed lint tool for Ruby?

浪尽此生 提交于 2019-11-30 06:16:14
问题 Most of the code I write is in Ruby, and every once in a while, I make some typo which only gets caught after a while. This is irritating when I have my scripts running long tasks, and return to find I had a typo. Is there an actively developed lint tool for Ruby that could help me overcome this? Would it be possible to use it across a system that works with a lot of source files, some of them loaded dynamically? Take this snippet as an example: a = 20 b = 30 puts c To win bounty, show me a

Is JSLint available for offline use?

百般思念 提交于 2019-11-30 06:03:18
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? 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) to a local folder. I change the name to jslint.htm to get it under 8.3 with no spaces. It seems to work