rstudio/shinyapps — pull request #102 by kevinushey (2014-10-14 17:07:12+00:00)
Title: add linter for capitalization + filepaths

This adds a simple linter that checks filenames for case sensitivity as used in R code. So, for example, a line like:

```R
read.csv("college.txt")
```

in a project containing a file `"College.txt"` would get the linter warning:

```R
The following lines contain paths to files not matching in case sensitivity:
32: file <- read.csv("college.txt")
```

The algorithm here is really simple, but hopefully 'good enough': for each `.R` or `.Rmd` file, we:

1. Extract everything within quotes (either `"` or `'`),
2. Check to see if there is a file of the same name (in a case-insensitive fashion),
3. If there is a match in a case-insensitive way but not in a case sensitive way, then we warn.

I am a bit concerned about the risk of false positives, so I am going to test this on some more apps before merging.

Note that this is overly simplistic in that it would not catch e.g. `file.path("subdir", "College.txt")`; there are yet more static analysis that could be done but this will likely be sufficient for many users.