Skip to content

Commit

Permalink
chore(workflows): add editorconfig-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
homksei committed Jul 16, 2024
1 parent 6ae4f4e commit b944ea7
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .ci/env/editorconfig-checker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#===============================================================================
# Copyright contributors to the oneDAL project
#
# 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.
#===============================================================================

VERSION=v3.0.3
NAME=ec-linux-amd64
ASSET=$NAME.tar.gz

# Download
export SHA256="fc698b0bf5bca0d42e28dd59d72e25487a51f645ca242c5f74bae975369f16aa $ASSET"
wget https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/$ASSET
echo "${SHA256}" | sha256sum --check

# Install
tar -xzf $ASSET
mv bin/$NAME /usr/local/bin/editorconfig-checker

# Clean up the downloaded archive
rm $ASSET
9 changes: 7 additions & 2 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,22 @@ variables:
SYSROOT_OS: 'jammy'

jobs:
- job: 'ClangFormat'
- job: 'FormattersChecks'
pool:
vmImage: '$(VM_IMAGE)'
steps:
- script: |
.ci/env/apt.sh clang-format
displayName: 'apt-get'
.ci/env/editorconfig-checker.sh
displayName: 'Install Dependencies'
- script: |
.ci/scripts/clang-format.sh
displayName: 'clang-format check'
failOnStderr: true
- script: |
editorconfig-checker
displayName: 'editorconfig-checker'
failOnStderr: true
- job: 'LinuxMakeGNU_MKL'
timeoutInMinutes: 0
Expand Down
17 changes: 17 additions & 0 deletions .ecrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"IndentSize": true,
"MaxLineLength": false
}
}
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{py,pl,pm,i,inc,c,cpp,h,hpp,s,f,f77,f90,fi,java}]
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
# max_line_length = 150

0 comments on commit b944ea7

Please sign in to comment.