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

style: Remove trailing whitespace and missing final newlines #433

Merged
merged 5 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Matches multiple files with brace expansion notation
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# style: Remove trailing whitespace and add missing final newlines
5cd1f0eb1668f06bf20378d6d4308fd4a1890581
27 changes: 27 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Check EditorConfig Format"
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
lint:
runs-on: "ubuntu-22.04"
steps:
- name: "Get Changed Files"
id: "files"
uses: "masesgroup/retrieve-changed-files@v2"
with:
format: "json"
- name: Check out code.
uses: actions/checkout@v2
- name: "Check EditorConfig Lint"
env:
EDITORCONFIG_FLAGS: '-disable-indent-size -disable-indentation'
run: |
sudo apt install -y jq golang
go install 'github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@latest'
readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
~/go/bin/editorconfig-checker ${{ env.EDITORCONFIG_FLAGS }} ${changed_files[@]}
4 changes: 2 additions & 2 deletions completions/gem.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function _installcomp {
then
REMOTE_GEMS=( $(gem list --remote --no-versions | tr '\n' ' ') )
fi

local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${REMOTE_GEMS[*]}" -- $cur) )
}
Expand All @@ -16,7 +16,7 @@ function _uninstallcomp {
then
LOCAL_GEMS=( $(gem list --no-versions | sed 's/\*\*\* LOCAL GEMS \*\*\*//' | tr '\n' ' ') )
fi

local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${LOCAL_GEMS[*]}" -- $cur) )
}
Expand Down
40 changes: 20 additions & 20 deletions completions/git_flow.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@
#
# git-flow-completion
# ===================
#
#
# Bash completion support for [git-flow](http://github.com/nvie/gitflow)
#
#
# The contained completion routines provide support for completing:
#
#
# * git-flow init and version
# * feature, hotfix and release branches
# * remote feature branch names (for `git-flow feature track`)
#
#
#
#
# Installation
# ------------
#
#
# To achieve git-flow completion nirvana:
#
#
# 0. Install git-completion.
#
#
# 1. Install this file. Either:
#
#
# a. Place it in a `bash-completion.d` folder:
#
#
# * /etc/bash-completion.d
# * /usr/local/etc/bash-completion.d
# * ~/bash-completion.d
#
#
# b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in
# your .bashrc:
#
#
# source ~/.git-flow-completion.sh
#
#
# 2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant
# $command case in _git:
#
#
# flow) _git_flow ;;
#
#
#
#
# The Fine Print
# --------------
#
#
# Copyright (c) 2010 [Justin Hileman](http://justinhileman.com)
#
#
# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)

_git_flow ()
Expand Down Expand Up @@ -128,7 +128,7 @@ __git_flow_release ()
__gitcomp "$subcommands"
return
fi

case "$subcommand" in
finish)
__gitcomp "$(__git_flow_list_releases)"
Expand Down Expand Up @@ -174,4 +174,4 @@ __git_flow_list_hotfixes ()
# temporarily wrap __git_find_on_cmdline() for backwards compatibility
if [ -z "`type -t __git_find_subcommand`" ]; then
alias __git_find_subcommand=__git_find_on_cmdline
fi
fi
40 changes: 20 additions & 20 deletions completions/jboss7.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ function _serverProfiles {
# assume is domain.sh
serverdir="../domain/configuration/"
fi

for i in ${!COMP_WORDS[*]}
do
if [[ "${COMP_WORDS[i]}" == "-Djboss.server.base.dir" || "${COMP_WORDS[i]}" == "-Djboss.domain.base.dir" ]]; then
serverdir="${COMP_WORDS[i+2]}/configuration"
fi
fi

done
if [ -d "${serverdir}" ]
then

IFS=$'\n' tmp="$(ls "${serverdir}" | grep xml)"
local fls="${tmp[@]// /\ }"
unset IFS
Expand All @@ -43,13 +43,13 @@ function _bindingAddress {
}

function _jboss {

local cur prev words cword
COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword

case $cur in

-Djboss.socket.binding.port-offset=*)
cur=${cur#*=}
#static list of common bindings sets
Expand All @@ -71,13 +71,13 @@ function _jboss {
COMPREPLY=( $(compgen -W "${booleans}" -- ${cur}) )
return 0
;;

-Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*)
cur=${cur#*=}
_filedir -d
return 0
;;

-Djboss.domain.master.address=*|-Djboss.bind.address*=*)
cur=${cur#*=}
_bindingAddress
Expand All @@ -86,8 +86,8 @@ function _jboss {
--server-config=*|-c=|--host-config=*)
cur=${cur#*=}
_serverProfiles
return 0
return 0


esac

Expand All @@ -111,14 +111,14 @@ function _jboss {
;;
esac
# *** from jboss5 ********************
# *** -modulepath -c -m -g -l -d -p -n -B -L -C -Djboss.platform.mbeanserver -Djboss.server.base.directory
# *** -modulepath -c -m -g -l -d -p -n -B -L -C -Djboss.platform.mbeanserver -Djboss.server.base.directory
# *** -Djboss.Domain -Djboss.modcluster.proxyList -Djboss.jvmRoute -Djboss.default.jgroups.stack -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port -Dcom.sun.management.jmxremote.ssl
# *************************************

# standard commands for standalone and domain mode
local commandsWithoutEqualSign='-b -bmanagement -bunsecure -bpublic --admin-only -h -help -u -version -V -v'
local commandsWithEqualSign='-P -Djboss.node.name -Djboss.home.dir -Djboss.socket.binding.port-offset -Djboss.bind.address.management -Djboss.bind.address -Djboss.bind.address.unsecure'

if [[ $COMP_WORDS == *standalone.sh* ]]
then
commandsWithoutEqualSign="${commandsWithoutEqualSign} -c"
Expand All @@ -128,15 +128,15 @@ function _jboss {
commandsWithoutEqualSign="${commandsWithoutEqualSign} --backup --cached-dc"
commandsWithEqualSign="${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir "
fi




COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" )
$( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) )



COMPREPLY=( $( compgen -W "$commandsWithoutEqualSign" -- "$cur" )
$( compgen -W "$commandsWithEqualSign" -S '=' -- "$cur" ) )
return 0


}
complete -o nospace -F _jboss standalone.sh
complete -o nospace -F _jboss domain.sh
16 changes: 8 additions & 8 deletions completions/maven.completion.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! bash oh-my-bash.module
# Bash completion support for maven
# inspired from :
# inspired from :
# - https://github.com/juven/maven-bash-completion
# - https://github.com/parisjug/maven-bash-completion

Expand Down Expand Up @@ -67,7 +67,7 @@ __find_mvn_projects()
}

function_exists _realpath ||
_realpath ()
_realpath ()
{
if [[ -f "$1" ]]
then
Expand All @@ -85,7 +85,7 @@ _realpath ()
fi
else
# file *cannot* exist
return 1 # failure
return 1 # failure
fi

# reassemble realpath
Expand All @@ -105,13 +105,13 @@ __pom_hierarchy()
## <parent> is present but not defined, assume ../pom.xml
if [ -z "$parent_pom_relative" ]; then
parent_pom_relative="../pom.xml"
fi
fi

## if pom exists continue else break
parent_pom=`_realpath "${pom%/*}/$parent_pom_relative"`
if [ -n "$parent_pom" ]; then
if [ -n "$parent_pom" ]; then
pom=$parent_pom
else
else
break
fi
POM_HIERARCHY+=("$pom")
Expand Down Expand Up @@ -175,7 +175,7 @@ _mvn()
local plugin_goals_liquibase="liquibase:changelogSync|liquibase:changelogSyncSQL|liquibase:clearCheckSums|liquibase:dbDoc|liquibase:diff|liquibase:dropAll|liquibase:help|liquibase:migrate|liquibase:listLocks|liquibase:migrateSQL|liquibase:releaseLocks|liquibase:rollback|liquibase:rollbackSQL|liquibase:status|liquibase:tag|liquibase:update|liquibase:updateSQL|liquibase:updateTestingRollback"
local plugin_goals_nexus_staging="nexus-staging:close|nexus-staging:deploy|nexus-staging:deploy-staged|nexus-staging:deploy-staged-repository|nexus-staging:drop|nexus-staging:help|nexus-staging:promote|nexus-staging:rc-close|nexus-staging:rc-drop|nexus-staging:rc-list|nexus-staging:rc-list-profiles|nexus-staging:rc-promote|nexus-staging:rc-release|nexus-staging:release"
#mvn help:describe -Dplugin=io.quarkus:quarkus-maven-plugin:0.15.0
local plugin_goals_quarkus="quarkus:add-extension|quarkus:add-extensions|quarkus:analyze-call-tree|quarkus:build|quarkus:create|quarkus:create-example-config|quarkus:dev|quarkus:help|quarkus:list-extensions|quarkus:native-image|quarkus:remote-dev"
local plugin_goals_quarkus="quarkus:add-extension|quarkus:add-extensions|quarkus:analyze-call-tree|quarkus:build|quarkus:create|quarkus:create-example-config|quarkus:dev|quarkus:help|quarkus:list-extensions|quarkus:native-image|quarkus:remote-dev"
local plugin_goals_pmd="pmd:pmd|pmd:cpd|pmd:check|pmd:cpd-check"
local plugin_goals_properties="properties:read-project-properties|properties:write-project-properties|properties:write-active-profile-properties|properties:set-system-properties"
local plugin_goals_release="release:clean|release:prepare|release:rollback|release:perform|release:stage|release:branch|release:update-versions"
Expand Down Expand Up @@ -203,7 +203,7 @@ _mvn()
local options="-Dmaven.test.skip=true|-DskipTests|-DskipITs|-Dtest|-Dit.test|-DfailIfNoTests|-Dmaven.surefire.debug|-DenableCiProfile|-Dpmd.skip=true|-Dcheckstyle.skip=true|-Dtycho.mode=maven|-Dmaven.javadoc.skip=true|-Dgwt.compiler.skip|-Dcobertura.skip=true|-Dfindbugs.skip=true||-DperformRelease=true|-Dgpg.skip=true|-DforkCount"

local profile_settings=`[ -e ~/.m2/settings.xml ] && grep -e "<profile>" -A 1 ~/.m2/settings.xml | grep -e "<id>.*</id>" | sed 's/.*<id>//' | sed 's/<\/id>.*//g' | tr '\n' '|' `

local profiles="${profile_settings}|"
for item in ${POM_HIERARCHY[*]}
do
Expand Down
Loading