From 72a96afa316894c5e681478ba40c1287708fa598 Mon Sep 17 00:00:00 2001 From: Marcello Teodori <151025+mteodori@users.noreply.github.com> Date: Wed, 23 Feb 2022 23:09:12 +0100 Subject: [PATCH] add editorconfig and checker --- .editorconfig | 17 +++++++ .pre-commit-config.yaml | 6 +++ .../Dockerfile | 2 +- .../3rd-party/Perl-Artistic-license.txt | 44 +++++++++---------- .../Dockerfile | 2 +- .../3rd-party/Perl-Artistic-license.txt | 44 +++++++++---------- alfresco-transformer-base/README.md | 36 +++++++-------- models/iptc/iptcModel.xml | 4 +- 8 files changed, 89 insertions(+), 66 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..c839484d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.java] +indent_size = 4 + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2550ecb..d8e4704f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,3 +18,9 @@ repos: hooks: - id: check-travis - id: check-github-workflows + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: 2.4.0 + hooks: + - id: editorconfig-checker + args: ['-disable-indent-size'] + exclude: (\.(pgm|pnm|ppm|html|eml)|quick.txt)$ diff --git a/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/Dockerfile b/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/Dockerfile index 814491b0..a5c611d7 100644 --- a/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/Dockerfile +++ b/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/Dockerfile @@ -43,7 +43,7 @@ RUN ln /usr/bin/alfresco-transform-core-aio-boot-${env.project_version}.jar /usr rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm && \ curl -s -S $ALFRESCO_PDF_RENDERER_LIB_RPM_URL -o alfresco-pdf-renderer-linux.tgz && \ tar xf alfresco-pdf-renderer-linux.tgz -C /usr/bin && \ - rm -f alfresco-pdf-renderer-linux.tgz && \ + rm -f alfresco-pdf-renderer-linux.tgz && \ curl -s -S $EXIFTOOL_URL -o ${EXIFTOOL_FOLDER}.tgz && \ tar xzf ${EXIFTOOL_FOLDER}.tgz && \ yum -y install perl perl-ExtUtils-MakeMaker make && \ diff --git a/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt b/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt index 4ff3f423..82d7f3b8 100644 --- a/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt +++ b/alfresco-transform-core-aio/alfresco-transform-core-aio-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt @@ -1,6 +1,6 @@ - The "Artistic License" + The "Artistic License" - Preamble + Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some @@ -11,30 +11,30 @@ reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. + "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. - "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes - of the Copyright Holder as specified below. + "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes + of the Copyright Holder as specified below. - "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. + "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. - "You" is you, if you're thinking about copying or distributing - this Package. + "You" is you, if you're thinking about copying or distributing + this Package. - "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people involved, - and so on. (You will not be required to justify it to the - Copyright Holder, but only to the computing community at large - as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people involved, + and so on. (You will not be required to justify it to the + Copyright Holder, but only to the computing community at large + as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. + "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you @@ -124,4 +124,4 @@ products derived from this software without specific prior written permission. IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - The End + The End diff --git a/alfresco-transform-pdf-renderer/alfresco-transform-pdf-renderer-boot/Dockerfile b/alfresco-transform-pdf-renderer/alfresco-transform-pdf-renderer-boot/Dockerfile index a5795366..2ee11dae 100644 --- a/alfresco-transform-pdf-renderer/alfresco-transform-pdf-renderer-boot/Dockerfile +++ b/alfresco-transform-pdf-renderer/alfresco-transform-pdf-renderer-boot/Dockerfile @@ -18,7 +18,7 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \ curl -s -S $ALFRESCO_PDF_RENDERER_LIB_RPM_URL -o alfresco-pdf-renderer-linux.tgz && \ tar xf alfresco-pdf-renderer-linux.tgz -C /usr/bin && \ - rm -f alfresco-pdf-renderer-linux.tgz && \ + rm -f alfresco-pdf-renderer-linux.tgz && \ yum clean all ADD target/generated-resources/licenses /licenses diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt b/alfresco-transform-tika/alfresco-transform-tika-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt index 4ff3f423..82d7f3b8 100644 --- a/alfresco-transform-tika/alfresco-transform-tika-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt +++ b/alfresco-transform-tika/alfresco-transform-tika-boot/src/main/resources/licenses/3rd-party/Perl-Artistic-license.txt @@ -1,6 +1,6 @@ - The "Artistic License" + The "Artistic License" - Preamble + Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some @@ -11,30 +11,30 @@ reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. + "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. - "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes - of the Copyright Holder as specified below. + "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes + of the Copyright Holder as specified below. - "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. + "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. - "You" is you, if you're thinking about copying or distributing - this Package. + "You" is you, if you're thinking about copying or distributing + this Package. - "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people involved, - and so on. (You will not be required to justify it to the - Copyright Holder, but only to the computing community at large - as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people involved, + and so on. (You will not be required to justify it to the + Copyright Holder, but only to the computing community at large + as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. + "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you @@ -124,4 +124,4 @@ products derived from this software without specific prior written permission. IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - The End + The End diff --git a/alfresco-transformer-base/README.md b/alfresco-transformer-base/README.md index d8dd8a97..5dbcf1f4 100644 --- a/alfresco-transformer-base/README.md +++ b/alfresco-transformer-base/README.md @@ -38,8 +38,8 @@ src/main/java/org/alfresco/transformer/Application.java