Permalink
Browse files

Merge branch 'beta'

* beta:
  Removing print and cleaning up.
  Fixing PEP8 reporter.
  RedefinedFunction should be Redefined.
  Updating messaging for next version.
  Upgrading Pyflakes to v0.6.1
  Upgrading JSHint to v1.0.0
  Adding messaging for v1.6.13.
  Updating python module to be compatible with PEP8 v1.4.
  Upgrading PEP8 to v1.4.
  Upgrading JSLint to latest.
  Upgrading JSHint to r12.
  Upgrading CSSLint to v0.9.10.
  Upgrading PyFlakes to 0.6.0
  Upgrading PyFlakes to 0.6.0
  Fixing issues with scratch spaces not having file names.
  Updating all mentions of Javascript to JavaScript.

Conflicts:
	package_control.json
  • Loading branch information...
jswartwood committed Feb 27, 2013
2 parents 7b8d387 + 12c0fc4 commit f1f3a9f66bc3d5f8ebb1671ad36963e9121a5074
View
@@ -15,7 +15,7 @@ SublimeLinter has built in linters for the following languages:
* Haml - syntax check via `haml -c`
* HTML - lint via `tidy` (actually [tidy for HTML5](http://w3c.github.com/tidy-html5/))
* Java - lint via `javac -Xlint`
-* Javascript - lint via built in [jshint](http://jshint.org), [jslint](http://jslint.com), or the [closure linter (gjslint)](https://developers.google.com/closure/utilities/docs/linter_howto) (if installed)
+* JavaScript - lint via built in [jshint](http://jshint.org), [jslint](http://jslint.com), or the [closure linter (gjslint)](https://developers.google.com/closure/utilities/docs/linter_howto) (if installed)
* Lua - syntax check via `luac`
* Objective-J - lint via built-in [capp_lint](https://github.com/aparajita/capp_lint)
* Perl - lint via [Perl:Critic](http://perlcritic.com/) or syntax+deprecation check via `perl -c`
@@ -53,13 +53,13 @@ The "Packages" directory is located at:
%APPDATA%/Sublime Text 2/Packages/
-### Javascript-based linters
-If you plan to edit files that use a Javascript-based linter (Javascript, CSS), your system
-must have a Javascript engine installed. Mac OS X comes with a preinstalled Javascript engine called
+### JavaScript-based linters
+If you plan to edit files that use a JavaScript-based linter (JavaScript, CSS), your system
+must have a JavaScript engine installed. Mac OS X comes with a preinstalled JavaScript engine called
JavaScriptCore, which is used if Node.js is not installed. On Windows, you **must** install the
-Javascript engine Node.js, which can be downloaded from [the Node.js site](http://nodejs.org/#download).
+JavaScript engine Node.js, which can be downloaded from [the Node.js site](http://nodejs.org/#download).
-On Mac OS X, you **must** install Node.js if you plan to edit Javascript or CSS files that
+On Mac OS X, you **must** install Node.js if you plan to edit JavaScript or CSS files that
use non-ASCII characters in strings or comments, because JavaScriptCore is not Unicode-aware.
After installing Node.js, if the Node.js executable ("node" on Mac OS X, "node.exe" on Windows)
@@ -92,15 +92,15 @@ Following are notes specific to individual linters that you should be aware of:
"c_cpplint": "/Users/[my username]/Desktop/cpplint.py"
}
-* **CSS** - This linter runs [csslint](http://csslint.net). This linter requires a Javascript engine (like Node.js) to be installed (see notes above for the JavaScript linters: "jshint" or "jslint").
+* **CSS** - This linter runs [csslint](http://csslint.net). This linter requires a JavaScript engine (like Node.js) to be installed (see notes above for the JavaScript linters: "jshint" or "jslint").
By default all CSSLint settings are turned on. You may customize CSSLint behavior with the "csslint_options" setting. Please select `Preferences->Package Settings->SublimeLinter->Settings - Default` for more information on turning off or adjusting severity of tests. For more information about options available to CSSLint, see https://github.com/stubbornella/csslint/wiki/Rules.
* **HTML** - This linter will not run unless you have a version of tidy with HTML5 support. To use this linter, please see: https://github.com/w3c/tidy-html5
* **Java** - Because it uses `javac` to do linting, each time you run the linter the entire dependency graph of the current file will be checked. Depending on the number of classes you import, this can be **extremely** slow. Also note that you **must** provide the `-sourcepath`, `-classpath`, `-Xlint` and `{filename}` arguments to `javac` in your per-project settings. See "Per-project settings" below for more information.
-* **JavaScript** - If the "javascript_linter" setting is "jshint" or "jslint", this linter runs [jshint](http://jshint.org) (or [jslint](http://jslint.com) respectively) using Node.js. See "Javascript-based linters" above for information on how to install Node.js.
+* **JavaScript** - If the "javascript_linter" setting is "jshint" or "jslint", this linter runs [jshint](http://jshint.org) (or [jslint](http://jslint.com) respectively) using Node.js. See "JavaScript-based linters" above for information on how to install Node.js.
If the "javascript_linter" setting is "gjslint", this linter runs the [closure linter (gjslint)](https://developers.google.com/closure/utilities/docs/linter_howto). After installation, if gjslint cannot be found by SublimeLinter, you may have to set the path to gjslint in the "sublimelinter\_executable\_map" setting.
@@ -382,7 +382,7 @@ If you wish to create a new linter to support a new language, SublimeLinter make
* Override `parse_errors()` and process the errors. If your linter overrides `built_in_check()`, `parse_errors()` will receive the result of that method. If your linter uses an external executable, `parse_errors()` receives the raw output of the executable, stripped of leading and trailing whitespace.
-* If you linter is powered via Javascript (eg. Node.js), there are few steps that will simplify the integration.
+* If you linter is powered via JavaScript (eg. Node.js), there are few steps that will simplify the integration.
Create a folder matching your linter name in the `SublimeLinter/sublimelinter/modules/lib` directory. This folder should include the linting library JS file (eg. jshint.js, csslint-Node.js) and a **linter.js** file. The **linter.js** file should `require()` the actual linter library file and export a `lint()` function. The `lint()` function should return a list of errors back to the python language handler file (via the `errors` parameter to the `parse_errors()` method).
View
@@ -131,7 +131,7 @@ def run_once(linter, view, **kwargs):
WARNINGS[vid] = {}
start = time.time()
text = view.substr(sublime.Region(0, view.size())).encode('utf-8')
- lines, error_underlines, violation_underlines, warning_underlines, ERRORS[vid], VIOLATIONS[vid], WARNINGS[vid] = linter.run(view, text, view.file_name().encode('utf-8') or '')
+ lines, error_underlines, violation_underlines, warning_underlines, ERRORS[vid], VIOLATIONS[vid], WARNINGS[vid] = linter.run(view, text, (view.file_name() or '').encode('utf-8'))
UNDERLINES[vid] = error_underlines[:]
UNDERLINES[vid].extend(violation_underlines)
@@ -402,7 +402,7 @@ def _update_view(view, filename, **kwargs):
valid_view = True
break
- if not valid_view or view.is_loading() or view.file_name().encode('utf-8') != filename:
+ if not valid_view or view.is_loading() or (view.file_name() or '').encode('utf-8') != filename:
return
try:
@@ -428,7 +428,7 @@ def queue_linter(linter, view, timeout=-1, preemptive=False, event=None):
busy_timeout = timeout
kwargs = {'timeout': timeout, 'busy_timeout': busy_timeout, 'preemptive': preemptive, 'event': event}
- queue(view, partial(_update_view, view, view.file_name().encode('utf-8'), **kwargs), kwargs)
+ queue(view, partial(_update_view, view, (view.file_name() or '').encode('utf-8'), **kwargs), kwargs)
def _callback(view, filename, kwargs):
@@ -608,7 +608,7 @@ def reload_view_module(view):
for name, linter in LINTERS.items():
module = sys.modules[linter.__module__]
- if module.__file__.encode('utf-8') == view.file_name().encode('utf-8'):
+ if module.__file__.encode('utf-8') == (view.file_name() or '').encode('utf-8'):
print 'SublimeLinter: reloading language:', linter.language
MOD_LOAD.reload_module(module)
lint_views(linter)
@@ -860,7 +860,7 @@ def run_(self, args):
return
text = view.substr(sublime.Region(0, view.size())).encode('utf-8')
- filename = view.file_name().encode('utf-8')
+ filename = (view.file_name() or '').encode('utf-8')
notes = linter.extract_annotations(text, view, filename)
_, filename = os.path.split(filename)
annotations_view, _id = view_in_tab(view, 'Annotations from {0}'.format(filename), notes, '')
@@ -93,7 +93,7 @@
// If true, when the file is saved any errors will appear in a popup list
"sublimelinter_popup_errors_on_save": false,
- // Javascript linter: "gjslint" to use the closure javascript linter (if available),
+ // JavaScript linter: "gjslint" to use the closure javascript linter (if available),
// or either "jshint" or "jslint" to use a built in linter.
"javascript_linter": "jshint",
View
@@ -38,7 +38,7 @@ NEW FEATURES
override any temporary changes you may have made to the settings in
a given view.
-- The google closure Javascript linter (gjslint) is now supported
+- The google closure JavaScript linter (gjslint) is now supported
(https://developers.google.com/closure/utilities/docs/linter_howto).
There is a new setting, "javascript_linter", which determines which
linter to use, jshint or gjslinter. You may also customize gjslint
@@ -145,7 +145,7 @@ SublimeLinter 1.5.7 changelog
=============================
CHANGES/FIXES
-- node.js is the preferred Javascript engine on Mac OS X and will be used if it is installed.
+- node.js is the preferred JavaScript engine on Mac OS X and will be used if it is installed.
JavaScriptCore does not handle non-ASCII text correctly and you should install node.js
if possible.
@@ -157,7 +157,7 @@ SublimeLinter 1.6.0 changelog
=============================
NEW FEATURES
-- Simpler abstraction of Javascript engines for JS powered linters.
+- Simpler abstraction of JavaScript engines for JS powered linters.
To leverage a JS linter, include a "linter.js" file; this file should
`require` the actual linter library file and export a `lint` function.
@@ -177,7 +177,7 @@ NEW FEATURES
python code of "css.py" and "javascript.py" in
"SublimeLinter/sublimelinter/modules".
-- Douglas Crockford's JSLint Javascript linter (jslint) is now supported
+- Douglas Crockford's JSLint JavaScript linter (jslint) is now supported
(http://jslint.com). To use JSLint set the "javascript_linter" setting
to "jslint". You may also customize jslint behavior with the
"jslint_options" setting. For more information about options available
@@ -201,7 +201,7 @@ CHANGES/FIXES
- Updated CSSLint, JSLint, JSHint to latest stable releases.
- Added additional debugging output (in Sublime console) when
- errors occur running linters written in Javascript.
+ errors occur running linters written in JavaScript.
SublimeLinter 1.6.2 changelog
@@ -428,3 +428,21 @@ CHANGES/FIXES
- Fixed issue #298: C linter throws "KeyError"
+
+SublimeLinter 1.6.13 changelog
+==============================
+
+CHANGES/FIXES
+
+- Updated PEP8 to version v1.4
+
+- Updated PyFlakes to v0.6.1
+
+- Updated CSSLint to v0.9.10
+
+- Update JSHint to v1.0.0
+
+- Update JSLint to latest
+
+- Fixed issues with attempting to encode file name when using
+ scratch space.
View
@@ -19,5 +19,6 @@
"1.6.9": "messages/1.6.9.txt",
"1.6.10": "messages/1.6.10.txt",
"1.6.11": "messages/1.6.11.txt",
- "1.6.12": "messages/1.6.12.txt"
+ "1.6.12": "messages/1.6.12.txt",
+ "1.6.13": "messages/1.6.13.txt"
}
View
@@ -40,7 +40,7 @@ NEW FEATURES
override any temporary changes you may have made to the settings in
a given view.
-- The google closure Javascript linter (gjslint) is now supported
+- The google closure JavaScript linter (gjslint) is now supported
(https://developers.google.com/closure/utilities/docs/linter_howto).
There is a new setting, "javascript_linter", which determines which
linter to use, jshint or gjslinter. You may also customize gjslint
View
@@ -2,7 +2,7 @@ SublimeLinter 1.5.7 changelog
CHANGES/FIXES
-- node.js is the preferred Javascript engine on Mac OS X and will be used if it is installed.
+- node.js is the preferred JavaScript engine on Mac OS X and will be used if it is installed.
JavaScriptCore does not handle non-ASCII text correctly and you should install node.js
if possible.
View
@@ -2,7 +2,7 @@ SublimeLinter 1.6.0 changelog
NEW FEATURES
-- Simpler abstraction of Javascript engines for JS powered linters.
+- Simpler abstraction of JavaScript engines for JS powered linters.
To leverage a JS linter, include a "linter.js" file; this file should
`require` the actual linter library file and export a `lint` function.
@@ -22,7 +22,7 @@ NEW FEATURES
python code of "css.py" and "javascript.py" in
"SublimeLinter/sublimelinter/modules".
-- Douglas Crockford's JSLint Javascript linter (jslint) is now supported
+- Douglas Crockford's JSLint JavaScript linter (jslint) is now supported
(http://jslint.com). To use JSLint set the "javascript_linter" setting
to "jslint". You may also customize jslint behavior with the
"jslint_options" setting. For more information about options available
View
@@ -7,7 +7,7 @@ CHANGES/FIXES
- Updated CSSLint, JSLint, JSHint to latest stable releases.
- Added additional debugging output (in Sublime console) when
- errors occur running linters written in Javascript.
+ errors occur running linters written in JavaScript.
IMPORTANT
View
@@ -0,0 +1,16 @@
+SublimeLinter 1.6.13 changelog
+
+CHANGES/FIXES
+
+- Updated PEP8 to version v1.4
+
+- Updated PyFlakes to v0.6.1
+
+- Updated CSSLint to v0.9.10
+
+- Update JSHint to v1.0.0
+
+- Update JSLint to latest
+
+- Fixed issues with attempting to encode file name when using
+ scratch space.
View
@@ -15,7 +15,7 @@ SublimeLinter has built in linters for the following languages:
* Haml - syntax check via `haml -c`
* HTML - lint via `tidy` (actually [tidy for HTML5](http://w3c.github.com/tidy-html5/))
* Java - lint via `javac -Xlint`
-* Javascript - lint via built in [jshint](http://jshint.org), [jslint](http://jslint.com), or the [closure linter (gjslint)](https://developers.google.com/closure/utilities/docs/linter_howto) (if installed)
+* JavaScript - lint via built in [jshint](http://jshint.org), [jslint](http://jslint.com), or the [closure linter (gjslint)](https://developers.google.com/closure/utilities/docs/linter_howto) (if installed)
* Lua - syntax check via `luac`
* Objective-J - lint via built-in [capp_lint](https://github.com/aparajita/capp_lint)
* Perl - lint via [Perl:Critic](http://perlcritic.com/) or syntax+deprecation check via `perl -c`
View
@@ -9,8 +9,8 @@
"platforms": {
"*": [
{
- "version": "1.6.12",
- "url": "https://nodeload.github.com/SublimeLinter/SublimeLinter/zip/v1.6.12"
+ "version": "1.6.13",
+ "url": "https://nodeload.github.com/SublimeLinter/SublimeLinter/zip/v1.6.13"
}
]
}
View
@@ -24,7 +24,7 @@
tmpdir = os.getcwdu()
os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__.encode('utf-8')), u'modules', u'libs')))
-for mod in [u'capp_lint', u'pep8', u'pyflakes', u'pyflakes.checker', u'pyflakes.messages']:
+for mod in [u'capp_lint', u'pep8', u'pyflakes', u'pyflakes.api', u'pyflakes.checker', u'pyflakes.messages', u'pyflakes.reporter']:
__import__(mod)
print u'imported {0}'.format(mod)
@@ -48,19 +48,19 @@ def fix_path(self):
return
path = os.environ['PATH'].encode('utf-8')
+ home_path = os.path.join(os.path.expanduser(u'~'), u'bin')
if path:
dirs = path.encode('utf-8').split(':')
if u'/usr/local/bin' not in dirs:
dirs.insert(0, u'/usr/local/bin')
- if u'~/bin' not in dirs and u'$HOME/bin' not in dirs:
- dirs.append(u'$HOME/bin')
+ if home_path not in dirs:
+ dirs.append(home_path)
os.environ['PATH'] = u':'.join(dirs)
-
def load_all(self):
'''loads all existing linter modules'''
for modf in glob.glob(u'{0}/*.py'.format(self.basepath)):
@@ -328,7 +328,7 @@ def jsc_path(self):
def find_file(self, filename, view):
'''Find a file with the given name, starting in the view's directory,
then ascending the file hierarchy up to root.'''
- path = view.file_name().encode('utf-8')
+ path = (view.file_name() or '').encode('utf-8')
# quit if the view is temporary
if not path:
@@ -375,7 +375,7 @@ def get_javascript_args(self, view, linter, code):
def get_javascript_options(self, view):
'''Subclasses should override this if they want to provide options
- for a Javascript-based linter. If the subclass cannot provide
+ for a JavaScript-based linter. If the subclass cannot provide
options, it should return None (or not return anything).'''
return None
@@ -409,4 +409,4 @@ def get_javascript_engine(self, view):
# Didn't find an engine, tell the user
engine_list = ', '.join(self.JAVASCRIPT_ENGINE_NAMES.values())
- return (False, '', 'One of the following Javascript engines must be installed: ' + engine_list)
+ return (False, '', 'One of the following JavaScript engines must be installed: ' + engine_list)
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# javascript.py - sublimelint package for checking Javascript files
+# javascript.py - sublimelint package for checking JavaScript files
import json
import re
Oops, something went wrong.

0 comments on commit f1f3a9f

Please sign in to comment.