Skip to content

Commit

Permalink
Updated license and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cxw42 authored and Chris White committed May 8, 2019
1 parent e2bd6b8 commit 6549e37
Show file tree
Hide file tree
Showing 23 changed files with 637 additions and 405 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Unless otherwise stated, all files are distributed under the Simplified BSD
license included below.

Copyright (c) 2011-2012 EditorConfig Team
Copyright (c) 2011-2019 EditorConfig Team
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
53 changes: 53 additions & 0 deletions LICENSE.PSF
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Some code in editorconfig-vim is derived from code licensed under the
PSF license. The following is the text of that license, retrieved 2019-05-05
from https://docs.python.org/2.6/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python

PSF LICENSE AGREEMENT FOR PYTHON 2.6.9

1. This LICENSE AGREEMENT is between the Python Software Foundation
(``PSF''), and the Individual or Organization (``Licensee'') accessing and
otherwise using Python 2.6.9 software in source or binary form and its
associated documentation.

2. Subject to the terms and conditions of this License Agreement, PSF
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 2.6.9
alone or in any derivative version, provided, however, that PSF's
License Agreement and PSF's notice of copyright, i.e., ``Copyright (c)
2001-2010 Python Software Foundation; All Rights Reserved'' are
retained in Python 2.6.9 alone or in any derivative version prepared
by Licensee.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 2.6.9 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 2.6.9.

4. PSF is making Python 2.6.9 available to Licensee on an ``AS IS''
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY
REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.6.9 WILL NOT INFRINGE
ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
2.6.9 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.6.9,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python 2.6.9, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.

# vi: set ft=:
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ OR

Then remember to call `:PluginInstall`.

### No editorconfig core required!
### No external editorconfig core library is required

This plugin **includes** the "core", the code that can parse
`.editorconfig` files.
Previous versions of this plugin also required a Python "core".
The core included the code to parse `.editorconfig` files.
This plugin **includes** the core, so you don't need to download the
core separately.

## Supported properties

Expand Down
3 changes: 2 additions & 1 deletion autoload/editorconfig.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
" Copyright (c) 2011-2012 EditorConfig Team
" autoload/editorconfig.vim: EditorConfig native Vimscript plugin
" Copyright (c) 2011-2019 EditorConfig Team
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
Expand Down
29 changes: 26 additions & 3 deletions autoload/editorconfig_core.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
" autoload/editorconfig_core.vim: top-level functions for
" editorconfig-core-vimscript.
" Copyright (c) 2018 Chris White. All rights reserved.
" editorconfig-core-vimscript and editorconfig-vim.

" Copyright (c) 2018-2019 EditorConfig Team, including Chris White {{{1
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE. }}}1

let s:saved_cpo = &cpo
set cpo&vim
Expand Down Expand Up @@ -116,7 +139,7 @@ function! editorconfig_core#currbuf_cli(names, job) " out_name, in_name, ...
endfunction "editorconfig_core#currbuf_cli

" }}}1
" === Caching =========================================================== {{{1
" === Caching (not yet used) ============================================ {{{1

" Cache for .editorconfig files. Full path -> settings map.
let s:config_cache = {}
Expand Down
44 changes: 34 additions & 10 deletions autoload/editorconfig_core/fnmatch.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
" encoding is utf8 - 中文
" autoload/editorconfig_core/fnmatch.vim: Globbing for
" editorconfig-core-vimscript. Ported from the Python core's fnmatch.py.
" Copyright (c) 2018--2019 Chris White. All rights reserved.
" editorconfig-vim. Ported from the Python core's fnmatch.py.

" Copyright (c) 2012-2019 EditorConfig Team {{{1
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE. }}}1

"Filename matching with shell patterns.
"
Expand All @@ -13,13 +35,6 @@
"
"The function translate(PATTERN) returns a regular expression
"corresponding to PATTERN. (It does not compile it.)
"
"Based on code from fnmatch.py file distributed with Python 2.6.
"
"Licensed under PSF License (see LICENSE.PSF file).
"
"Changes to original fnmatch module:
"- translate function supports ``*`` and ``**`` similarly to fnmatch C library

let s:saved_cpo = &cpo
set cpo&vim
Expand Down Expand Up @@ -433,6 +448,15 @@ function! editorconfig_core#fnmatch#fnmatchcase(name, path, pattern)
return pattern_matched
endfunction " fnmatchcase

" }}}1
" === Copyright notices ================================================= {{{1
" Based on code from fnmatch.py file distributed with Python 2.6.
" Portions Copyright (c) 2001-2010 Python Software Foundation;
" All Rights Reserved. Licensed under PSF License (see LICENSE.PSF file).
"
" Changes to original fnmatch:
"
" - translate function supports ``*`` and ``**`` similarly to fnmatch C library
" }}}1

let &cpo = s:saved_cpo
Expand Down
38 changes: 26 additions & 12 deletions autoload/editorconfig_core/handler.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
" autoload/editorconfig_core/handler.vim: Main worker for
" editorconfig-core-vimscript.
" Copyright (c) 2018 Chris White. All rights reserved.
" editorconfig-core-vimscript and editorconfig-vim.
" Modified from the Python core's handler.py.

" Copyright (c) 2012-2019 EditorConfig Team {{{1
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE. }}}1

let s:saved_cpo = &cpo
set cpo&vim
Expand Down Expand Up @@ -152,16 +176,6 @@ function! s:preprocess_values(job, opts)
endfunction " preprocess_values

" }}}1
" === Copyright notices ================================================= {{{2
""""EditorConfig file handler

"Provides ``EditorConfigHandler`` class for locating and parsing
"EditorConfig files relevant to a given filepath.

"Licensed under Simplified BSD License (see LICENSE.BSD file).

""""
" }}}2

let &cpo = s:saved_cpo
unlet! s:saved_cpo
Expand Down
51 changes: 36 additions & 15 deletions autoload/editorconfig_core/ini.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
" autoload/editorconfig_core/ini.vim: Config-file parser for
" editorconfig-core-vimscript. Modifed from the Python core's ini.py.
" Copyright (c) 2018 Chris White. All rights reserved.
" editorconfig-core-vimscript and editorconfig-vim.
" Modifed from the Python core's ini.py.

" Copyright (c) 2012-2019 EditorConfig Team {{{2
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE. }}}2

let s:saved_cpo = &cpo
set cpo&vim
Expand Down Expand Up @@ -231,19 +255,16 @@ endfunction " matches_filename

" }}}1
" === Copyright notices ================================================= {{{2
""""EditorConfig file parser

"Based on code from ConfigParser.py file distributed with Python 2.6.

"Licensed under PSF License (see LICENSE.PSF file).

"Changes to original ConfigParser:

"- Special characters can be used in section names
"- Octothorpe can be used for comments (not just at beginning of line)
"- Only track INI options in sections that match target filename
"- Stop parsing files with when ``root = true`` is found
""""
" Based on code from ConfigParser.py file distributed with Python 2.6.
" Portions Copyright (c) 2001-2010 Python Software Foundation;
" All Rights Reserved. Licensed under PSF License (see LICENSE.PSF file).
"
" Changes to original ConfigParser:
"
" - Special characters can be used in section names
" - Octothorpe can be used for comments (not just at beginning of line)
" - Only track INI options in sections that match target filename
" - Stop parsing files with when ``root = true`` is found
" }}}2

let &cpo = s:saved_cpo
Expand Down
25 changes: 24 additions & 1 deletion autoload/editorconfig_core/util.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
" util.vim: part of editorconfig-core-vimscript
" util.vim: part of editorconfig-core-vimscript and editorconfig-vim.
" Copyright (c) 2018-2019 EditorConfig Team, including Chris White {{{1
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are met:
"
" 1. Redistributions of source code must retain the above copyright notice,
" this list of conditions and the following disclaimer.
" 2. Redistributions in binary form must reproduce the above copyright notice,
" this list of conditions and the following disclaimer in the documentation
" and/or other materials provided with the distribution.
"
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
" POSSIBILITY OF SUCH DAMAGE. }}}1

let s:saved_cpo = &cpo
set cpo&vim
Expand Down
4 changes: 2 additions & 2 deletions doc/editorconfig.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
*editorconfig.txt*

File: editorconfig.txt
Version: 0.3.3
Version: 1.0.0-beta
Maintainer: EditorConfig Team <http://editorconfig.org>
Description: EditorConfig vim plugin

License:
Copyright (c) 2011-2015 EditorConfig Team
Copyright (c) 2011-2019 EditorConfig Team
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion mkzip.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

zip -r editorconfig-vim-$*.zip plugin/editorconfig.vim plugin/editorconfig.py plugin/editorconfig-core-py/* doc/editorconfig.txt autoload/*.vim
zip -r editorconfig-vim-$*.zip plugin/* autoload/* doc/*
3 changes: 2 additions & 1 deletion plugin/editorconfig.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
" Copyright (c) 2011-2018 EditorConfig Team
" plugin/editorconfig.vim: EditorConfig native Vimscript plugin file
" Copyright (c) 2011-2019 EditorConfig Team
" All rights reserved.
"
" Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit 6549e37

Please sign in to comment.