Skip to content

Commit

Permalink
runtime: Distribute the editorconfig with vim
Browse files Browse the repository at this point in the history
This is the editorconfig-vim plugin Commit e014708e917b457e8f6c57f357d55dd3826880d4
from https://github.com/editorconfig/editorconfig-vim

closes: vim#2286
related: editorconfig/editorconfig-vim#223

Signed-off-by: Christian Brabandt <[email protected]>
  • Loading branch information
chrisbra committed Aug 23, 2023
1 parent 2f25e40 commit 7e8f687
Show file tree
Hide file tree
Showing 36 changed files with 3,681 additions and 0 deletions.
105 changes: 105 additions & 0 deletions runtime/pack/dist/opt/editorconfig/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# appveyor.yml for editorconfig-vim. Currently only tests the core.
# Modified from https://github.com/ppalaga/ec4j/commit/1c849658fb189cd95bc41af95acd43b4f0d75a48
#
# Copyright (c) 2017--2019 Angelo Zerr and other contributors as
# indicated by the @author tags.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# @author Chris White (cxw42) - Adapted to editorconfig-vim

# === When to build ===
# See https://www.appveyor.com/docs/how-to/filtering-commits/

skip_commits:
message: /\[minor\]/
files:
- '**/*.md'

# === Build matrix ===

# Win is default; Ubuntu is override. See
# https://www.appveyor.com/blog/2018/04/25/specialized-build-matrix-configuration-in-appveyor/
image:
- Visual Studio 2013
- Ubuntu1604

# === How to build ===

cache:
- C:\vim -> .appveyor.yml, tests\fetch-vim.bat

environment:
VIM_EXE: C:\vim\vim\vim80\vim.exe

for:
# Don't run the Windows build if the commit message includes "[ci-linux]"
-
matrix:
only:
- image: Visual Studio 2013
skip_commits:
message: /\[ci-linux\]/

# Platform-specific configuration for Ubuntu
-
matrix:
only:
- image: Ubuntu1604
# $APPVEYOR_BUILD_FOLDER isn't expanded in the environment section
# here, so I can't set $VIM_EXE the way I want to. Instead,
# I set $VIM_EXE in the sh-specific install steps below.
environment:
VIM_EXE: UNDEFINED
cache:
- $APPVEYOR_BUILD_FOLDER/vim -> .appveyor.yml, tests/fetch-vim.sh

# Plus, don't run Ubuntu if the commit message includes [ci-win]
skip_commits:
message: /\[ci-win\]/

install:
# Ubuntu-specific setup. These carry forward to the build_script.
- sh: export VIM_EXE="$APPVEYOR_BUILD_FOLDER/vim/bin/vim"
- sh: export PATH="$PATH":$APPVEYOR_BUILD_FOLDER/vim/bin
- sh: echo "$VIM_EXE , $PATH"

# Cross-platform - test the core
- cmake --version
- git submodule update --init --recursive
- cmd: tests\fetch-vim
- sh: tests/fetch-vim.sh

build_script:
# Build the core tests
- cd tests
- cd core
- mkdir build
- cd build
- cmake ..

# Note on multicore testing:
# Two cores are available per https://help.appveyor.com/discussions/questions/11179-how-many-cores-and-threads-can-be-used-in-free-appveyor-build .
# However, using -j2 seems to make each job take much longer.

test_script:
# Run the core tests
- ctest . --output-on-failure -C Debug

# CTestCustom specifies skipping some tests on Windows.
- cmd: echo "Reminder - skipped some tests"

on_failure:
- echo "failed"
- cmd: type tests\core\build\Testing\Temporary\LastTest.log
- sh: cat tests/core/build/Testing/Temporary/LastTest.log
27 changes: 27 additions & 0 deletions runtime/pack/dist/opt/editorconfig/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
root = true

[*]
end_of_line = lf
charset = utf-8
max_line_length = 80

[*.{vim,sh}]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80

[*.rb]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

[*.yml]
indent_style = space
indent_size = 2

[*.{bat,vbs,ps1}]
end_of_line = CRLF
8 changes: 8 additions & 0 deletions runtime/pack/dist/opt/editorconfig/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tags
tests/**/build
tests/**/.bundle

# Editor backup files
*.swp
*~
~*
6 changes: 6 additions & 0 deletions runtime/pack/dist/opt/editorconfig/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "plugin_tests"]
path = tests/plugin/spec/plugin_tests
url = https://github.com/editorconfig/editorconfig-plugin-tests.git
[submodule "core_tests"]
path = tests/core/tests
url = https://github.com/editorconfig/editorconfig-core-test.git
30 changes: 30 additions & 0 deletions runtime/pack/dist/opt/editorconfig/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Make sure xvfb works - https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-directly
dist: trusty

matrix:
include:
- name: "plugin"
env: TEST_WHICH=plugin
language: ruby
rvm:
- 2.2.4
gemfile: tests/plugin/Gemfile
- name: "core"
env: TEST_WHICH=core

addons:
apt:
packages:
- vim-gtk

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

script:
./tests/travis-test.sh

notifications:
email:
on_success: change
on_failure: always
6 changes: 6 additions & 0 deletions runtime/pack/dist/opt/editorconfig/CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Contributors to the EditorConfig Vim Plugin:

Hong Xu
Trey Hunner
Kent Frazier
Chris White
26 changes: 26 additions & 0 deletions runtime/pack/dist/opt/editorconfig/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Unless otherwise stated, all files are distributed under the Simplified BSD
license included below.

Copyright (c) 2011-2019 EditorConfig Team
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.
53 changes: 53 additions & 0 deletions runtime/pack/dist/opt/editorconfig/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=:
Loading

0 comments on commit 7e8f687

Please sign in to comment.