Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check whether R has installed the library lintr #911

Closed
wants to merge 1 commit into from
Closed

Check whether R has installed the library lintr #911

wants to merge 1 commit into from

Conversation

@marsam
Copy link
Contributor

@marsam marsam commented Mar 18, 2016

No description provided.

:message (if has-lintr "present" "missing")
:face (if has-lintr 'success '(bold error)))))))

(defun flycheck-R-has-lintr (R)

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016
Contributor

Please use a lowercase r. I know that the language name is R, but for the sake of consistency I'd like to stick to Emacs Lisp' naming conventions.

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016
Contributor

Also, please move this function before the syntax checker definition :)

"--slave" "--restore" "--no-save" "-e"
"library('lintr')")
(goto-char (point-min))
(not (looking-at-p "Error in library(\"lintr\") : there is no package called ‘lintr’"))))

This comment has been minimized.

@lunaryorn

lunaryorn Mar 18, 2016
Contributor

Are these really smart quotes here? Wouldn't that break on non-UTF-8 locales?

This comment has been minimized.

@marsam

marsam Mar 19, 2016
Author Contributor

yes they are smart quotes, but can be disabled adding to LC_ALL=C the process-environment

(let ((process-environment (append '("LC_ALL=C") process-environment)))
  ;; ...
  ;; or simply check for "there is no package called"  
  (not (re-search-forward "there is no package called 'lintr'" nil 'no-error)) 
@lunaryorn
Copy link
Contributor

@lunaryorn lunaryorn commented Mar 18, 2016

@marsam Nice, thank you very much 👍 There are a couple of minor issues which I'd like to ask you ti fix, but other than that it looks good, in my opinion ☺️

@marsam
Copy link
Contributor Author

@marsam marsam commented Mar 19, 2016

Hi, I've updated the pull request, tell me if there is more issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants