├── .github ├── dependabot.yml └── workflows │ ├── docker-image.yml │ └── hugo-ghpages.yml ├── .gitignore ├── .travis.yml ├── Dockerfile ├── LICENCE.md ├── README.md ├── docker └── postgresql.yml ├── pom.xml ├── schemacrawler.colormap.properties ├── schemacrawler.config.properties ├── sonar-project.properties └── src ├── main ├── java │ └── io │ │ └── github │ │ └── mbarre │ │ └── schemacrawler │ │ ├── tool │ │ └── linter │ │ │ ├── LinterBlobTypeColumn.java │ │ │ ├── LinterBooleanContent.java │ │ │ ├── LinterByteaTypeColumn.java │ │ │ ├── LinterColumnContentNotNormalized.java │ │ │ ├── LinterColumnSize.java │ │ │ ├── LinterCompressBlob.java │ │ │ ├── LinterForbiddenPrimaryKeyType.java │ │ │ ├── LinterForeignKeyMismatchLazy.java │ │ │ ├── LinterForeignKeyName.java │ │ │ ├── LinterJsonContent.java │ │ │ ├── LinterJsonTypeColumn.java │ │ │ ├── LinterLeftSpacePadding.java │ │ │ ├── LinterNoSpaceInNames.java │ │ │ ├── LinterOrphanTable.java │ │ │ ├── LinterPluralTableName.java │ │ │ ├── LinterPrimaryKeyNotIntegerLikeType.java │ │ │ ├── LinterRightSpacePadding.java │ │ │ ├── LinterTableNameNotInLowerCase.java │ │ │ ├── LinterTimeStampWithOutTimeZoneColumn.java │ │ │ └── LinterXmlContent.java │ │ └── utils │ │ ├── JSonUtils.java │ │ ├── LintUtils.java │ │ └── XmlUtils.java └── resources │ ├── META-INF │ ├── logback.xml │ └── services │ │ └── schemacrawler.tools.lint.Linter │ └── schemacrawler-linter-config.xml ├── site ├── .gitmodules ├── archetypes │ └── default.md ├── config.toml ├── content │ ├── additional_lints │ │ ├── _index.md │ │ ├── allabout │ │ │ └── allabout.md │ │ ├── docker │ │ │ └── docker.md │ │ └── download │ │ │ └── _index.md │ ├── project_documentation │ │ ├── _index.md │ │ ├── code_quality │ │ │ └── code_quality.md │ │ └── collaborators │ │ │ └── collaborators.md │ └── schemacrawler │ │ └── _index.md └── themes │ └── hugo-theme-learn │ ├── .editorconfig │ ├── .gitignore │ ├── .grenrc.yml │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── archetypes │ ├── chapter.md │ └── default.md │ ├── exampleSite │ ├── LICENSE.md │ ├── config.toml │ ├── content │ │ ├── _index.en.md │ │ ├── _index.fr.md │ │ ├── basics │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ ├── _index.zh.md │ │ │ ├── configuration │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ │ └── home_button_defaults.jpg │ │ │ ├── installation │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ │ └── chapter.png │ │ │ ├── requirements │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ │ └── magic.gif │ │ │ └── style-customization │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ ├── blue-variant.png │ │ │ │ ├── green-variant.png │ │ │ │ └── red-variant.png │ │ ├── cont │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ ├── archetypes.en.md │ │ │ ├── archetypes.fr.md │ │ │ ├── i18n │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ │ └── i18n-menu.gif │ │ │ ├── icons.en.md │ │ │ ├── markdown.en.md │ │ │ ├── markdown.fr.md │ │ │ ├── menushortcuts.en.md │ │ │ ├── menushortcuts.fr.md │ │ │ ├── pages │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── images │ │ │ │ │ ├── frontmatter-icon.png │ │ │ │ │ ├── pages-chapter.png │ │ │ │ │ └── pages-default.png │ │ │ ├── syntaxhighlight.en.md │ │ │ ├── tags.en.md │ │ │ └── tags.fr.md │ │ ├── credits.en.md │ │ ├── credits.fr.md │ │ ├── shortcodes │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ ├── attachments.en.files │ │ │ │ ├── BachGavotteShort.mp3 │ │ │ │ ├── Carroll_AliceAuPaysDesMerveilles.pdf │ │ │ │ ├── adivorciarsetoca00cape.pdf │ │ │ │ ├── hugo.png │ │ │ │ └── movieselectricsheep-flock-244-32500-2.mp4 │ │ │ ├── attachments.en.md │ │ │ ├── attachments.fr.files │ │ │ │ ├── BachGavotteShort.mp3 │ │ │ │ ├── Carroll_AliceAuPaysDesMerveilles.pdf │ │ │ │ ├── adivorciarsetoca00cape.pdf │ │ │ │ ├── hugo.png │ │ │ │ └── movieselectricsheep-flock-244-32500-2.mp4 │ │ │ ├── attachments.fr.md │ │ │ ├── button.en.md │ │ │ ├── button.fr.md │ │ │ ├── children │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ ├── children-1 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ └── children-1-1 │ │ │ │ │ │ ├── _index.en.md │ │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ │ └── children-1-1-1 │ │ │ │ │ │ ├── _index.en.md │ │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ │ └── children-1-1-1-1 │ │ │ │ │ │ ├── _index.en.md │ │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ │ └── children-1-1-1-1-1 │ │ │ │ │ │ ├── _index.en.md │ │ │ │ │ │ └── _index.fr.md │ │ │ │ ├── children-2 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ ├── test3.en.md │ │ │ │ │ └── test3.fr.md │ │ │ │ ├── children-3 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ └── _index.fr.md │ │ │ │ ├── children-4 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ └── _index.fr.md │ │ │ │ ├── test.en.md │ │ │ │ └── test.fr.md │ │ │ ├── expand.en.md │ │ │ ├── expand.fr.md │ │ │ ├── mermaid.en.md │ │ │ ├── mermaid.fr.md │ │ │ ├── notice.en.md │ │ │ ├── notice.fr.md │ │ │ ├── siteparam.en.md │ │ │ └── siteparam.fr.md │ │ ├── showcase.en.md │ │ └── showcase.fr.md │ ├── layouts │ │ ├── partials │ │ │ ├── custom-footer.html │ │ │ ├── logo.html │ │ │ └── menu-footer.html │ │ └── shortcodes │ │ │ └── ghcontributors.html │ └── static │ │ ├── css │ │ └── theme-mine.css │ │ ├── fonts │ │ ├── monogramos-webfont.eot │ │ ├── monogramos-webfont.svg │ │ ├── monogramos-webfont.ttf │ │ ├── monogramos-webfont.woff │ │ └── monogramos-webfont.woff2 │ │ └── images │ │ └── showcase │ │ ├── inteliver_docs.png │ │ ├── tat.png │ │ └── tshark_dev.png │ ├── i18n │ ├── ar.toml │ ├── de.toml │ ├── en.toml │ ├── es.toml │ ├── fr.toml │ ├── hi.toml │ ├── id.toml │ ├── ja.toml │ ├── nl.toml │ ├── pt.toml │ ├── ru.toml │ ├── tr.toml │ └── zh-cn.toml │ ├── images │ ├── screenshot.png │ └── tn.png │ ├── layouts │ ├── 404.html │ ├── _default │ │ ├── list.html │ │ └── single.html │ ├── index.html │ ├── index.json │ ├── partials │ │ ├── custom-comments.html │ │ ├── custom-footer.html │ │ ├── custom-header.html │ │ ├── favicon.html │ │ ├── footer.html │ │ ├── header.html │ │ ├── logo.html │ │ ├── menu-footer.html │ │ ├── menu.html │ │ ├── meta.html │ │ ├── search.html │ │ ├── tags.html │ │ └── toc.html │ └── shortcodes │ │ ├── attachments.html │ │ ├── button.html │ │ ├── children.html │ │ ├── expand.html │ │ ├── mermaid.html │ │ ├── notice.html │ │ ├── ref.html │ │ ├── relref.html │ │ └── siteparam.html │ ├── netlify.toml │ ├── static │ ├── css │ │ ├── atom-one-dark-reasonable.css │ │ ├── auto-complete.css │ │ ├── featherlight.min.css │ │ ├── fontawesome-all.min.css │ │ ├── hugo-theme.css │ │ ├── hybrid.css │ │ ├── nucleus.css │ │ ├── perfect-scrollbar.min.css │ │ ├── tags.css │ │ ├── theme-blue.css │ │ ├── theme-green.css │ │ ├── theme-red.css │ │ └── theme.css │ ├── fonts │ │ ├── Inconsolata.eot │ │ ├── Inconsolata.svg │ │ ├── Inconsolata.ttf │ │ ├── Inconsolata.woff │ │ ├── Novecentosanswide-Normal-webfont.eot │ │ ├── Novecentosanswide-Normal-webfont.svg │ │ ├── Novecentosanswide-Normal-webfont.ttf │ │ ├── Novecentosanswide-Normal-webfont.woff │ │ ├── Novecentosanswide-Normal-webfont.woff2 │ │ ├── Novecentosanswide-UltraLight-webfont.eot │ │ ├── Novecentosanswide-UltraLight-webfont.svg │ │ ├── Novecentosanswide-UltraLight-webfont.ttf │ │ ├── Novecentosanswide-UltraLight-webfont.woff │ │ ├── Novecentosanswide-UltraLight-webfont.woff2 │ │ ├── Work_Sans_200.eot │ │ ├── Work_Sans_200.svg │ │ ├── Work_Sans_200.ttf │ │ ├── Work_Sans_200.woff │ │ ├── Work_Sans_200.woff2 │ │ ├── Work_Sans_300.eot │ │ ├── Work_Sans_300.svg │ │ ├── Work_Sans_300.ttf │ │ ├── Work_Sans_300.woff │ │ ├── Work_Sans_300.woff2 │ │ ├── Work_Sans_500.eot │ │ ├── Work_Sans_500.svg │ │ ├── Work_Sans_500.ttf │ │ ├── Work_Sans_500.woff │ │ └── Work_Sans_500.woff2 │ ├── images │ │ ├── clippy.svg │ │ ├── favicon.png │ │ └── gopher-404.jpg │ ├── js │ │ ├── auto-complete.js │ │ ├── clipboard.min.js │ │ ├── featherlight.min.js │ │ ├── highlight.pack.js │ │ ├── hugo-learn.js │ │ ├── jquery-3.3.1.min.js │ │ ├── jquery.sticky.js │ │ ├── learn.js │ │ ├── lunr.min.js │ │ ├── modernizr.custom-3.6.0.js │ │ ├── perfect-scrollbar.jquery.min.js │ │ ├── perfect-scrollbar.min.js │ │ └── search.js │ ├── mermaid │ │ └── mermaid.js │ └── webfonts │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 │ ├── theme.toml │ └── wercker.yml └── test ├── db └── liquibase │ ├── LinterBlobTypeColumn │ └── db.changelog.xml │ ├── LinterBooleanContentColumn │ └── db.changelog.xml │ ├── LinterColumnContentNotNormalized │ └── db.changelog.xml │ ├── LinterColumnSize │ └── db.changelog.xml │ ├── LinterCompressBlob │ ├── db.changelog.xml │ └── test.txt │ ├── LinterForbiddenPrimaryKeyType │ └── db.changelog.xml │ ├── LinterForeignKeyMismatchLazy │ └── db.changelog.xml │ ├── LinterForeignKeyName │ └── db.changelog.xml │ ├── LinterJsonContent │ └── db.changelog.xml │ ├── LinterJsonTypeColumn │ └── db.changelog.xml │ ├── LinterLeftSpacePadding │ └── db.changelog.xml │ ├── LinterNoSpaceInNames │ └── db.changelog.xml │ ├── LinterOrphanTable │ └── db.changelog.xml │ ├── LinterPluralTableName │ └── db.changelog.xml │ ├── LinterPrimaryKeyNotIntegerLikeType │ └── db.changelog.xml │ ├── LinterRightSpacePadding │ └── db.changelog.xml │ ├── LinterTableNameNotInLowerCase │ └── db.changelog.xml │ ├── LinterTimeStampWithOutTimeZoneColumn │ └── db.changelog.xml │ ├── LinterXmlContent │ └── db.changelog.xml │ └── dba │ └── sql │ └── init_db_test.sql ├── java ├── TestLintPlugin.java └── io │ └── github │ └── mbarre │ └── schemacrawler │ ├── test │ └── utils │ │ ├── LintWrapper.java │ │ └── PostgreSqlDatabase.java │ ├── tool │ └── linter │ │ ├── BaseLintTest.java │ │ ├── LinterBlobTypeColumnTest.java │ │ ├── LinterBooleanContentTest.java │ │ ├── LinterColumnContentNotNormalizedTest.java │ │ ├── LinterColumnSizeTest.java │ │ ├── LinterCompressBlobTest.java │ │ ├── LinterForeignKeyMismatchLazyTest.java │ │ ├── LinterForeignKeyNameTest.java │ │ ├── LinterJsonContentTest.java │ │ ├── LinterJsonTypeColumnTest.java │ │ ├── LinterLeftSpacePaddingTest.java │ │ ├── LinterNoSpaceInNamesTest.java │ │ ├── LinterOrphanTableTest.java │ │ ├── LinterPluralTableNameTest.java │ │ ├── LinterPrimaryKeyNotIntegerLikeTypeTest.java │ │ ├── LinterRightSpacePaddingTest.java │ │ ├── LinterTableNameNotInLowerCaseTest.java │ │ ├── LinterTimeStampWithOutTimeZoneColumnTest.java │ │ └── LinterXmlContentTest.java │ └── utils │ ├── JSonUtilsTest.java │ ├── LintUtilsTest.java │ └── XmlUtilsTest.java └── resources ├── LinterBlobTypeColumn └── schemacrawler-linter-configs-test.xml ├── LinterBooleanContent └── schemacrawler-linter-configs-test.xml ├── LinterByteaTypeColumn └── schemacrawler-linter-configs-test.xml ├── LinterColumnContentNotNormalized └── schemacrawler-linter-configs-test.xml ├── LinterColumnSize └── schemacrawler-linter-configs-test.xml ├── LinterCompressBlob └── schemacrawler-linter-configs-test.xml ├── LinterForbiddenPrimaryKeyType └── schemacrawler-linter-configs-test.xml ├── LinterForeignKeyMismatchLazy └── schemacrawler-linter-configs-test.xml ├── LinterForeignKeyName └── schemacrawler-linter-configs-test.xml ├── LinterJsonContent └── schemacrawler-linter-configs-test.xml ├── LinterJsonTypeColumn └── schemacrawler-linter-configs-test.xml ├── LinterLeftSpacePadding └── schemacrawler-linter-configs-test.xml ├── LinterNoSpaceInNames └── schemacrawler-linter-configs-test.xml ├── LinterOrphanTable └── schemacrawler-linter-configs-test.xml ├── LinterPluralTableName └── schemacrawler-linter-configs-test.xml ├── LinterPrimaryKeyNotIntegerLikeType └── schemacrawler-linter-configs-test.xml ├── LinterRightSpacePadding └── schemacrawler-linter-configs-test.xml ├── LinterTableNameNotInLowerCase └── schemacrawler-linter-configs-test.xml ├── LinterTimeStampWithOutTimeZoneColumn └── schemacrawler-linter-configs-test.xml ├── LinterXmlContent └── schemacrawler-linter-configs-test.xml └── test.properties /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: maven 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "07:00" 8 | open-pull-requests-limit: 10 9 | ignore: 10 | - dependency-name: org.apache.maven.doxia:doxia-module-markdown 11 | versions: 12 | - "> 1.8" 13 | - dependency-name: org.liquibase:liquibase-maven-plugin 14 | versions: 15 | - 4.2.2 16 | - 4.3.0 17 | - 4.3.1 18 | - 4.3.2 19 | - 4.3.3 20 | - dependency-name: us.fatehi:schemacrawler-lint 21 | versions: 22 | - 16.11.7 23 | - 16.12.1 24 | - 16.12.2 25 | - 16.12.3 26 | - 16.14.1 27 | - 16.14.2 28 | - 16.14.3 29 | - 16.14.4 30 | - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 31 | versions: 32 | - 2.12.1 33 | - 2.12.2 34 | - dependency-name: org.postgresql:postgresql 35 | versions: 36 | - 42.2.18 37 | - 42.2.19 38 | - dependency-name: org.apache.commons:commons-lang3 39 | versions: 40 | - "3.11" 41 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Docker Image CI 2 | 3 | on: 4 | push: 5 | branches: master 6 | tags: '*.*.*' 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name : Checkout 13 | uses: actions/checkout@v2 14 | 15 | - name: Prepare 16 | id: prep 17 | run: | 18 | DOCKER_IMAGE=mbarre/schemacrawler-additional-lints 19 | VERSION=noop 20 | if [[ $GITHUB_REF == refs/tags/* ]]; then 21 | VERSION=${GITHUB_REF#refs/tags/} 22 | TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${VERSION}" 23 | else 24 | TAGS="${DOCKER_IMAGE}:latest" 25 | fi 26 | echo ::set-output name=tags::${TAGS} 27 | 28 | - name: Build with Maven 29 | run: mvn install -DskipTests --file pom.xml 30 | 31 | - name: Set Up QEMU 32 | uses: docker/setup-qemu-action@v1 33 | 34 | - name: Set Up Buildx 35 | uses: docker/setup-buildx-action@v1 36 | 37 | - name: Login to DockerHub 38 | uses: docker/login-action@v1 39 | with: 40 | username: ${{ secrets.DOCKERHUB_USERNAME }} 41 | password: ${{ secrets.DOCKERHUB_TOKEN }} 42 | 43 | - name: Build and push from master 44 | id: docker_build_master 45 | uses: docker/build-push-action@v2 46 | with: 47 | context: . 48 | file: ./Dockerfile 49 | platforms: linux/amd64, linux/arm64, linux/386 50 | #TODO find a way to inject these values 51 | build-args: | 52 | SCHEMACRAWLER_VERSION=16.10.1 53 | LINTS_VERSION=1.06.11 54 | push: true 55 | tags: ${{ steps.prep.outputs.tags }} 56 | 57 | - name: Image digest 58 | run: echo ${{ steps.docker_build.outputs.digest }} 59 | -------------------------------------------------------------------------------- /.github/workflows/hugo-ghpages.yml: -------------------------------------------------------------------------------- 1 | name: hugo 2 | 3 | on: 4 | push: 5 | tags: '*.*.*' 6 | 7 | jobs: 8 | hugo: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - 12 | name: Checkout 13 | uses: actions/checkout@v2 14 | - 15 | name: Run Hugo 16 | uses: crazy-max/ghaction-hugo@v1 17 | with: 18 | version: latest 19 | extended: false 20 | args: --source src/site --cleanDestinationDir --minify --verbose 21 | - 22 | name: Deploy to GitHub Pages 23 | if: success() && github.event_name != 'pull_request' 24 | uses: crazy-max/ghaction-github-pages@v2 25 | with: 26 | target_branch: gh-pages 27 | build_dir: src/site/public 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /src/test/db/liquibase/*/liquibase.properties 6 | /src/test/db/liquibase/*/test.log 7 | .idea/compiler.xml 8 | .idea/copyright 9 | .idea/encodings.xml 10 | .idea/libraries 11 | .idea/misc.xml 12 | .idea/modules.xml 13 | .idea/vcs.xml 14 | .idea/workspace.xml 15 | schemacrawler-additionnallints.iml 16 | .idea 17 | .DS_Store 18 | dependency-reduced-pom.xml 19 | schemacrawler-additional-lints.iml 20 | src/test/resources/test.properties 21 | .allure 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG SCHEMACRAWLER_VERSION 2 | ARG LINTS_VERSION 3 | 4 | FROM schemacrawler/schemacrawler:v${SCHEMACRAWLER_VERSION} 5 | 6 | USER schcrwlr 7 | WORKDIR /home/schcrwlr 8 | 9 | LABEL \ 10 | "io.github.mbarre.product-version"="SchemaCrawler Additional Lints ${LINTS_VERSION}" \ 11 | "io.github.mbarre.website"="http://mbarre.github.io/schemacrawler-additional-lints/" \ 12 | "io.github.mbarre.docker-hub"="https://hub.docker.com/r/mbarre/schemacrawler-additional-lints" 13 | 14 | MAINTAINER Michèle Barré 15 | 16 | USER root 17 | RUN addgroup schcrwlr 18 | 19 | # Copy linter config file 20 | COPY --chown=schcrwlr:schcrwlr src/main/resources/schemacrawler-linter-config.xml . 21 | 22 | # Copy additional-lints and additional-lints-csv local jar files 23 | COPY --chown=schcrwlr:schcrwlr target/schemacrawler-additional-lints-*.jar /opt/schemacrawler/lib/ 24 | COPY --chown=schcrwlr:schcrwlr target/schemacrawler-additional-command-lints-as-csv-*.jar /opt/schemacrawler/lib/ 25 | 26 | RUN chmod +rx /opt/schemacrawler/lib/*.jar 27 | 28 | # Create aliases for SchemaCrawler 29 | RUN chmod +rx /opt/schemacrawler/schemacrawler.sh 30 | USER schcrwlr 31 | RUN echo 'alias schemacrawler="/opt/schemacrawler/schemacrawler.sh"' >> /home/schcrwlr/.bashrc 32 | 33 | -------------------------------------------------------------------------------- /docker/postgresql.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | sc_test_postgres: 4 | image: "postgres:9.4" 5 | environment: 6 | POSTGRES_USER: postgres 7 | POSTGRES_PASSWORD: postgres 8 | ports: 9 | - 5433:5432 10 | # Persist the data between container invocations 11 | volumes: 12 | - ./../src/test/db/liquibase/dba/sql:/docker-entrypoint-initdb.d 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /schemacrawler.colormap.properties: -------------------------------------------------------------------------------- 1 | # --=----=----=----=----=----=----=----=----=----=----=----=----=----=----=----= 2 | # SchemaCrawler: Custom Color Map 3 | # --=----=----=----=----=----=----=----=----=----=----=----=----=----=----=----= 4 | 5 | # Add one line for each color that you want to assign to a schema. 6 | # Colors are specified using HTML color syntax, also known as a hexadecimal 7 | # triplet. https://www.wikiwand.com/en/Web_colors#/Hex_triplet 8 | # Do not use a leading # for the color. 9 | # Specify schemas using a regular expression. Schema matches are case-sensitive. 10 | # ------------------------------------------------------------------------------ 11 | 12 | EEEEEE=.*\.FOR_LINT 13 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.organization=mbarre 2 | sonar.projectKey=schemacrawler-additional-lints 3 | sonar.pullrequest.base=master 4 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterBlobTypeColumn.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import io.github.mbarre.schemacrawler.utils.LintUtils; 26 | import schemacrawler.schema.Column; 27 | import schemacrawler.schema.Table; 28 | import schemacrawler.tools.lint.BaseLinter; 29 | import schemacrawler.tools.lint.LintSeverity; 30 | 31 | import java.sql.Connection; 32 | import java.util.List; 33 | import java.util.logging.Level; 34 | import java.util.logging.Logger; 35 | 36 | /** 37 | * 38 | * @author barmi83 39 | */ 40 | public class LinterBlobTypeColumn extends BaseLinter { 41 | private static final Logger LOGGER = Logger.getLogger(LinterBlobTypeColumn.class.getName()); 42 | 43 | 44 | 45 | /** 46 | * The lint that parses and test primary keys 47 | * 48 | */ 49 | public LinterBlobTypeColumn() { 50 | super(); 51 | setSeverity(LintSeverity.critical); 52 | } 53 | 54 | /** 55 | * Get lint descrption 56 | * @return lint description 57 | */ 58 | @Override 59 | public String getDescription() { 60 | return getSummary(); 61 | } 62 | 63 | /** 64 | * Get lint Summary 65 | * @return lint Summary 66 | */ 67 | @Override 68 | public String getSummary() { 69 | return "BLOB should not be used"; 70 | } 71 | 72 | /** 73 | * The lint that does the job 74 | * @param table table 75 | * @param connection connection 76 | */ 77 | @Override 78 | protected void lint(final Table table, final Connection connection) { 79 | List columns = getColumns(table); 80 | for (Column column : columns) { 81 | LOGGER.log(Level.INFO, "Checking {0}...", column.getFullName()); 82 | if(LintUtils.isSqlTypeBinayBased(column.getColumnDataType().getJavaSqlType().getVendorTypeNumber())){ 83 | addTableLint(table, getDescription(), column.getFullName()); 84 | } 85 | } 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterForbiddenPrimaryKeyType.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /*- 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2018 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.util.List; 27 | import java.util.logging.Level; 28 | import java.util.logging.Logger; 29 | 30 | import io.github.mbarre.schemacrawler.utils.LintUtils; 31 | import schemacrawler.schema.Column; 32 | import schemacrawler.schema.Table; 33 | import schemacrawler.tools.lint.BaseLinter; 34 | import schemacrawler.tools.lint.LintSeverity; 35 | 36 | public class LinterForbiddenPrimaryKeyType extends BaseLinter 37 | { 38 | private static final Logger LOGGER = Logger.getLogger(LinterForbiddenPrimaryKeyType.class.getName()); 39 | 40 | /** 41 | * The lint that parses and test primary keys 42 | * 43 | */ 44 | public LinterForbiddenPrimaryKeyType() { 45 | super(); 46 | setSeverity(LintSeverity.high); 47 | } 48 | 49 | @Override 50 | protected void lint(Table table, Connection connection) { 51 | List columns = getColumns(table); 52 | for (Column column : columns) { 53 | if(column.isPartOfPrimaryKey()){ 54 | LOGGER.log(Level.INFO, "Checking {0}...", column.getFullName()); 55 | if(LintUtils.isSqlTypeDateBased(column.getColumnDataType().getJavaSqlType().getVendorTypeNumber())) 56 | addTableLint(table, getDescription(), column.getFullName()); 57 | } 58 | } 59 | } 60 | 61 | /** 62 | * Get the lint description 63 | * @return lint description 64 | */ 65 | @Override 66 | public String getDescription() 67 | { 68 | return getSummary(); 69 | } 70 | 71 | @Override 72 | public String getSummary() { 73 | return "Current primary Key type is forbidden."; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterNoSpaceInNames.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /*- 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2018 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.util.List; 27 | 28 | import schemacrawler.schema.Column; 29 | import schemacrawler.schema.Table; 30 | import schemacrawler.tools.lint.BaseLinter; 31 | import schemacrawler.tools.lint.LintSeverity; 32 | 33 | public class LinterNoSpaceInNames extends BaseLinter { 34 | 35 | 36 | /** 37 | * The lint that test if the table and column names contain spaces 38 | */ 39 | public LinterNoSpaceInNames() { 40 | setSeverity(LintSeverity.high); 41 | } 42 | 43 | /** 44 | * Get the lint description 45 | * @return lint description 46 | */ 47 | @Override 48 | public String getDescription() 49 | { 50 | return getSummary(); 51 | } 52 | 53 | 54 | /** 55 | * The lint that does the job 56 | * @param table table 57 | * @param connection connection 58 | */ 59 | @Override 60 | protected void lint(Table table, Connection connection) { 61 | List columns = getColumns(table); 62 | String tableName = table.getName().replaceAll("\"", ""); 63 | if(tableName.contains(" ")) { 64 | addTableLint(table, getDescription(), table.getFullName()); 65 | } 66 | 67 | for (Column column : columns) { 68 | if(column.getName().contains(" ")) 69 | addTableLint(table, getDescription(), column.getFullName()); 70 | } 71 | } 72 | 73 | 74 | /** 75 | * Get the summary 76 | * @return the summary 77 | */ 78 | @Override 79 | public String getSummary() { 80 | return "Space should not be used in table or column names"; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterOrphanTable.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /*- 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2017 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import schemacrawler.schema.Table; 26 | import schemacrawler.tools.lint.BaseLinter; 27 | import schemacrawler.tools.lint.LintSeverity; 28 | 29 | import java.sql.Connection; 30 | import static java.util.Objects.requireNonNull; 31 | 32 | /** 33 | * Linter to check if a table has foreign key or is referenced in any other table. 34 | * A table with no relation is suspicious. 35 | * @author mbarre 36 | * @since 1.0.1 37 | */ 38 | public class LinterOrphanTable extends BaseLinter { 39 | 40 | public LinterOrphanTable() { 41 | setSeverity(LintSeverity.critical); 42 | } 43 | 44 | /** 45 | * Get the lint description 46 | * @return lint description 47 | */ 48 | @Override 49 | public String getDescription() 50 | { 51 | return getSummary(); 52 | } 53 | 54 | /** 55 | * Get the lint summary 56 | * @return the lint summary 57 | */ 58 | @Override 59 | public String getSummary() 60 | { 61 | return "table has no relation with any other table."; 62 | } 63 | 64 | /** 65 | * The lint that does the job 66 | * @param table table 67 | * @param connection 68 | */ 69 | @Override 70 | protected void lint(final Table table, final Connection connection) 71 | { 72 | requireNonNull(table, "No table provided"); 73 | 74 | if(table.getExportedForeignKeys().isEmpty() && table.getForeignKeys().isEmpty()) 75 | addTableLint(table, getDescription(), table.getName()); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterPluralTableName.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | 4 | 5 | /*- 6 | * #%L 7 | * Additional SchemaCrawler Lints 8 | * %% 9 | * Copyright (C) 2015 - 2018 github 10 | * %% 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public 22 | * License along with this program. If not, see 23 | * . 24 | * #L% 25 | */ 26 | 27 | import schemacrawler.schema.Table; 28 | import schemacrawler.tools.lint.BaseLinter; 29 | import schemacrawler.tools.lint.LintSeverity; 30 | import static java.util.Objects.requireNonNull; 31 | import java.sql.Connection; 32 | 33 | /** 34 | * Linter to check if a table has its name plural ou singular 35 | * Table represents a collection of entities, there is no need for plural names. 36 | * @author mbarre 37 | */ 38 | public class LinterPluralTableName extends BaseLinter { 39 | 40 | public LinterPluralTableName() { 41 | setSeverity(LintSeverity.medium); 42 | } 43 | 44 | 45 | /** 46 | * Get the lint description 47 | * @return lint description 48 | */ 49 | @Override 50 | public String getDescription() 51 | { 52 | return getSummary(); 53 | } 54 | 55 | /** 56 | * Get the lint summary 57 | * @return the lint summary 58 | */ 59 | @Override 60 | public String getSummary() 61 | { 62 | return "Don't use plural for table name."; 63 | } 64 | 65 | /** 66 | * The lint that does the job 67 | * @param table table 68 | * @param connection 69 | */ 70 | @Override 71 | protected void lint(final Table table, final Connection connection){ 72 | requireNonNull(table, "No table provided"); 73 | 74 | if(table.getName().endsWith("s")) 75 | addTableLint(table, getDescription(), table.getName()); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterPrimaryKeyNotIntegerLikeType.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import io.github.mbarre.schemacrawler.utils.LintUtils; 26 | import schemacrawler.schema.Column; 27 | import schemacrawler.schema.Table; 28 | import schemacrawler.tools.lint.BaseLinter; 29 | import schemacrawler.tools.lint.LintSeverity; 30 | 31 | import java.sql.Connection; 32 | import java.sql.Types; 33 | import java.util.List; 34 | import java.util.logging.Level; 35 | import java.util.logging.Logger; 36 | 37 | /* 38 | * Linter to check if primary key is integer like type 39 | * Created by barmi83 40 | */ 41 | 42 | public class LinterPrimaryKeyNotIntegerLikeType extends BaseLinter { 43 | private static final Logger LOGGER = Logger.getLogger(LinterPrimaryKeyNotIntegerLikeType.class.getName()); 44 | 45 | /** 46 | * The lint that parses and test primary keys 47 | * 48 | */ 49 | public LinterPrimaryKeyNotIntegerLikeType() { 50 | super(); 51 | setSeverity(LintSeverity.high); 52 | } 53 | 54 | /** 55 | * Get lint descrption 56 | * @return lint description 57 | */ 58 | @Override 59 | public String getDescription() { 60 | return getSummary(); 61 | } 62 | 63 | /** 64 | * Get lint Summary 65 | * @return lint Summary 66 | */ 67 | @Override 68 | public String getSummary() { 69 | return "should be Integer like type or eventually char(1)"; 70 | } 71 | 72 | /** 73 | * The lint that does the job 74 | * @param table table 75 | * @param connection connection 76 | */ 77 | @Override 78 | protected void lint(final Table table, final Connection connection) { 79 | List columns = getColumns(table); 80 | for (Column column : columns) { 81 | if(column.isPartOfPrimaryKey()){ 82 | LOGGER.log(Level.INFO, "Checking {0}...", column.getFullName()); 83 | if(!LintUtils.isSqlTypeIntegerBased(column.getColumnDataType().getJavaSqlType().getVendorTypeNumber()) 84 | && !(column.getColumnDataType().getJavaSqlType().getVendorTypeNumber() == Types.CHAR && column.getSize() == 1)){ 85 | addTableLint(table, getDescription(), column.getFullName()); 86 | } 87 | } 88 | } 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/tool/linter/LinterTimeStampWithOutTimeZoneColumn.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | import java.sql.Connection; 4 | import java.util.List; 5 | import java.util.logging.Level; 6 | import java.util.logging.Logger; 7 | 8 | import io.github.mbarre.schemacrawler.utils.LintUtils; 9 | 10 | /* 11 | * #%L 12 | * Additional SchemaCrawler Lints 13 | * %% 14 | * Copyright (C) 2015 - 2016 github 15 | * %% 16 | * This program is free software: you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as 18 | * published by the Free Software Foundation, either version 3 of the 19 | * License, or (at your option) any later version. 20 | * 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | * 26 | * You should have received a copy of the GNU General Public 27 | * License along with this program. If not, see 28 | * . 29 | * #L% 30 | */ 31 | 32 | import schemacrawler.schema.Column; 33 | import schemacrawler.schema.Table; 34 | import schemacrawler.tools.lint.BaseLinter; 35 | import schemacrawler.tools.lint.LintSeverity; 36 | 37 | /** 38 | * Linter to check if the column has any TimeStamp data type columns if so suggest to use TimeStamp with TimeZones - PostgreSQL reserved 39 | * lint 40 | * 41 | * @author Bheem 42 | * @since 1.0.0 43 | */ 44 | public class LinterTimeStampWithOutTimeZoneColumn extends BaseLinter { 45 | private static final Logger LOGGER = Logger.getLogger(LinterTimeStampWithOutTimeZoneColumn.class.getName()); 46 | 47 | /** 48 | * The lint that test if column with TimeStamp data type alone used without TimeZone 49 | * 50 | */ 51 | public LinterTimeStampWithOutTimeZoneColumn() { 52 | super(); 53 | setSeverity(LintSeverity.critical); 54 | } 55 | 56 | /** 57 | * Get the description 58 | * 59 | * @return the description 60 | */ 61 | 62 | public String getDescription() { 63 | return "Timestamp without time zone (timestamp) is not a permitted data type. Use timestamp with time zone (timestamptz)"; 64 | } 65 | 66 | /** 67 | * Get the summary 68 | * 69 | * @return the summary 70 | */ 71 | @Override 72 | public String getSummary() { 73 | return "Use timeStamptz instead of just TimeStamp"; 74 | } 75 | 76 | /** 77 | * The lint that does the job 78 | * 79 | * @param table 80 | * table 81 | * @param connection 82 | * connection 83 | */ 84 | @Override 85 | protected void lint(final Table table, final Connection connection) { 86 | List columns = getColumns(table); 87 | for (Column column : columns) { 88 | LOGGER.log(Level.INFO, "Checking {0}...", column.getFullName()); 89 | if (column.getColumnDataType().toString().equalsIgnoreCase("timestamp")) { 90 | addTableLint(table, getDescription(), column.getFullName()); 91 | } 92 | } 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/utils/JSonUtils.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.utils; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import com.google.gson.Gson; 26 | import org.slf4j.LoggerFactory; 27 | 28 | /** 29 | * Provides some tools around JSon to share them on the whole project. 30 | * @author adriens 31 | */ 32 | public class JSonUtils { 33 | 34 | private JSonUtils(){ 35 | throw new IllegalAccessError("Utility class."); 36 | } 37 | 38 | /** 39 | * Test if a string is a valid json 40 | * @param content content 41 | * @return is the string's content is a valid json or not 42 | */ 43 | public static boolean isJsonContent(String content){ 44 | if (content == null) 45 | return false; 46 | 47 | Gson gson = new Gson(); 48 | try { 49 | gson.fromJson(content, Object.class); 50 | return true; 51 | } catch (Exception e) { 52 | LoggerFactory.getLogger(JSonUtils.class).info("String is not JSON.", e); 53 | return false; 54 | } 55 | 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/io/github/mbarre/schemacrawler/utils/XmlUtils.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.utils; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.io.IOException; 26 | import java.io.StringReader; 27 | import javax.xml.parsers.DocumentBuilder; 28 | import javax.xml.parsers.DocumentBuilderFactory; 29 | import javax.xml.parsers.ParserConfigurationException; 30 | 31 | import org.slf4j.LoggerFactory; 32 | import org.xml.sax.ErrorHandler; 33 | import org.xml.sax.InputSource; 34 | import org.xml.sax.SAXException; 35 | import org.xml.sax.SAXParseException; 36 | 37 | /** 38 | * 39 | * @author salad74 40 | */ 41 | public class XmlUtils { 42 | 43 | private XmlUtils(){ 44 | throw new IllegalAccessError("Utility class."); 45 | } 46 | 47 | /** 48 | * Tells wether a column contens XML data or not. 49 | * @param data the string to test 50 | * @return if the string is a valid xml (or not) 51 | */ 52 | public static final boolean isXmlContent(String data) { 53 | 54 | if(data == null) 55 | return false; 56 | 57 | DocumentBuilder db; 58 | try { 59 | 60 | db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); 61 | db.setErrorHandler(new SimpleErrorHandler()); 62 | 63 | InputSource is = new InputSource(); 64 | is.setCharacterStream(new StringReader(data)); 65 | db.parse(is); 66 | 67 | return true; 68 | 69 | } catch (SAXException | IOException | ParserConfigurationException e) { 70 | LoggerFactory.getLogger(XmlUtils.class).info("String is not XML.", e); 71 | return false; 72 | } 73 | } 74 | 75 | 76 | private static class SimpleErrorHandler implements ErrorHandler { 77 | @Override 78 | public void warning(SAXParseException e) { 79 | // Do nothing 80 | } 81 | 82 | @Override 83 | public void error(SAXParseException e) { 84 | // Do nothing 85 | } 86 | 87 | @Override 88 | public void fatalError(SAXParseException e) { 89 | // Do nothing 90 | } 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | [${APP_NAME}] %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/schemacrawler.tools.lint.Linter: -------------------------------------------------------------------------------- 1 | io.github.mbarre.schemacrawler.tool.linter.LinterTableNameNotInLowerCase 2 | io.github.mbarre.schemacrawler.tool.linter.LinterColumnContentNotNormalized 3 | io.github.mbarre.schemacrawler.tool.linter.LinterJsonTypeColumn 4 | io.github.mbarre.schemacrawler.tool.linter.LinterJsonContent 5 | io.github.mbarre.schemacrawler.tool.linter.LinterXmlContent 6 | io.github.mbarre.schemacrawler.tool.linter.LinterBooleanContent 7 | io.github.mbarre.schemacrawler.tool.linter.LinterPrimaryKeyNotIntegerLikeType 8 | io.github.mbarre.schemacrawler.tool.linter.LinterBlobTypeColumn 9 | io.github.mbarre.schemacrawler.tool.linter.LinterColumnSize 10 | io.github.mbarre.schemacrawler.tool.linter.LinterForeignKeyMismatchLazy 11 | io.github.mbarre.schemacrawler.tool.linter.LinterForeignKeyName 12 | io.github.mbarre.schemacrawler.tool.linter.LinterByteaTypeColumn 13 | io.github.mbarre.schemacrawler.tool.linter.LinterCompressBlob 14 | io.github.mbarre.schemacrawler.tool.linter.LinterOrphanTable 15 | io.github.mbarre.schemacrawler.tool.linter.LinterForbiddenPrimaryKeyType 16 | io.github.mbarre.schemacrawler.tool.linter.LinterNoSpaceInNames 17 | io.github.mbarre.schemacrawler.tool.linter.LinterPluralTableName 18 | io.github.mbarre.schemacrawler.tool.linter.LinterLeftSpacePadding 19 | io.github.mbarre.schemacrawler.tool.linter.LinterRightSpacePadding 20 | io.github.mbarre.schemacrawler.tool.linter.LinterTimeStampWithOutTimeZoneColumn -------------------------------------------------------------------------------- /src/site/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "themes/hugo-theme-learn"] 2 | path = themes/hugo-theme-learn 3 | url = https://github.com/matcornic/hugo-theme-learn.git 4 | -------------------------------------------------------------------------------- /src/site/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /src/site/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "http://mbarre.github.io/schemacrawler-additional-lints/" 2 | languageCode = "en-us" 3 | title = "Schemacrawler Additionnal Lints web site" 4 | 5 | # Change the default theme to be use when building the site with Hugo 6 | theme = "hugo-theme-learn" 7 | 8 | # For search functionality 9 | [outputs] 10 | home = [ "HTML", "RSS", "JSON"] 11 | 12 | -------------------------------------------------------------------------------- /src/site/content/additional_lints/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "additional_lints" 3 | menuTitle = "Additional Lints" 4 | date = 2020-11-16T09:53:07+11:00 5 | weight = 5 6 | chapter = true 7 | pre = "" 8 | +++ 9 | 10 | ### Additional Lints 11 | 12 | # 13 | 14 | Discover what Schemacrawler Additional Lints are all about and the core-concepts behind it. -------------------------------------------------------------------------------- /src/site/content/additional_lints/docker/docker.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "docker" 3 | menuTitle = "Docker Image" 4 | weight = 15 5 | +++ 6 | 7 | Schemacrawler Additional Lints is now released with an [image](https://hub.docker.com/r/mbarre/schemacrawler-additional-lints) on Docker Hub. This is an extension of the [SchemaCrawler Docker Image](https://www.schemacrawler.com/docker-image.html). 8 | 9 | You can run docker container like this : 10 | 11 | docker run --name schemacrawler-additional-lints --rm -i -t --entrypoint=/bin/bash --net=host mbarre/schemacrawler-additional-lints 12 | 13 | --net=host option will allow you to work on database deployed on your host. 14 | 15 | Use the Schemacrawler Interactive Shell 16 | 17 | schemacrawler --shell 18 | 19 | Use the following script from within the shell to launch the lints analysis : 20 | 21 | connect --server=your_db_server --database=your_db --user=your_user 22 | load --info-level=minimum 23 | execute --command lint 24 | 25 | Or, simplier... 26 | 27 | schemacrawler --server=your_db_server --database=your_db --user=your_user --info-level=minimum --command lint 28 | 29 | The docker image also includes the command which export lints in csv files, for more information see [adriens/schemacrawler-additional-command-lints-as-csv](https://github.com/adriens/schemacrawler-additional-command-lints-as-csv) 30 | 31 | You can try it this way : 32 | 33 | schemacrawler --server=your_db_server --database=your_db --user=your_user --info-level=minimum --command csv 34 | 35 | A default linter config file is available in the schemacrawler container home directory : **schemacrawler-linter-config.xml**. 36 | You can use it to include or exclude tables, change the lints severity, by adding **--linter-configs=schemacrawler-linter-config.xml** to lint and csv commands. 37 | 38 | Enjoy ! -------------------------------------------------------------------------------- /src/site/content/additional_lints/download/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title= "Download" 3 | date= 2020-11-16T14:19:30+11:00 4 | +++ 5 | 6 | There is two way to download Schemacrawler Additional Lints artifacts : 7 | - directly from [Github release page](https://github.com/mbarre/schemacrawler-additional-lints/releases), 8 | - or... using Maven or Gradle on [Jitpack repository](https://jitpack.io/#mbarre/schemacrawler-additional-lints) 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/site/content/project_documentation/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Project documentation" 3 | date = 2020-11-16T15:57:45+11:00 4 | weight = 20 5 | chapter = true 6 | pre = "" 7 | +++ 8 | 9 | ### Project documentation 10 | 11 | Collaborators list and overview of code quality checks. 12 | -------------------------------------------------------------------------------- /src/site/content/project_documentation/code_quality/code_quality.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Code Quality Checks" 3 | date = 2020-11-16T15:57:45+11:00 4 | weight = 25 5 | pre = "" 6 | +++ 7 | 8 | 9 | https://coveralls.io/github/mbarre/schemacrawler-additional-lints -------------------------------------------------------------------------------- /src/site/content/project_documentation/collaborators/collaborators.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Collaborators" 3 | date = 2020-11-16T15:57:45+11:00 4 | weight = 20 5 | pre = "" 6 | +++ 7 | 8 | 9 | #### [Michèle Barré](https://github.com/mbarre) 10 | 11 | Project creator, main developper 12 | 13 | Nouméa, New Caledonia (GMT+11) 14 | 15 | 16 | #### [Adrien Sales](https://github.com/adriens) 17 | 18 | DBA, Documentation contributor, Tester, PostgreSQL expert, Schemacrawler integrator, Open source evangelist 19 | 20 | Nouméa, New Caledonia (GMT+11) 21 | 22 | 23 | #### [Sualeh Fatehi](https://github.com/sualeh) 24 | 25 | Schemacrawler project creator 26 | 27 | GMT+5 28 | 29 | 30 | #### [Martin Vallet](https://github.com/mvallet-calinfo) 31 | 32 | Developer 33 | 34 | Nouméa, New Caledonia (GMT+11) 35 | 36 | 37 | #### [Thomas Lemaire](https://github.com/ThomasLemaire) 38 | 39 | Developer 40 | 41 | Nouméa, New Caledonia (GMT+11) 42 | 43 | 44 | #### [bheemreddy181](https://github.com/bheemreddy181) 45 | 46 | Developer, User 47 | 48 | GMT-6 -------------------------------------------------------------------------------- /src/site/content/schemacrawler/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "schemacrawler" 3 | menuTitle = "Schemacrawler" 4 | date = 2020-11-16T12:31:04+11:00 5 | weight = 15 6 | chapter = true 7 | pre = "" 8 | +++ 9 | 10 | ### Schemacrawler 11 | 12 | # 13 | 14 | https://www.schemacrawler.com/ -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | trim_trailing_whitespace = true 11 | 12 | [*.js] 13 | insert_final_newline = true 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | public/ 3 | exampleSite/public 4 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/.grenrc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dataSource: "prs" 3 | prefix: "v" 4 | onlyMilestones: false 5 | changelogFilename: "CHANGELOG.md" 6 | includeMessages: "all" 7 | ignoreIssuesWith: 8 | - "support" 9 | ignoreLabels: 10 | - "duplicate" 11 | - "invalid" 12 | - "wontfix" 13 | groupBy: 14 | New features: 15 | - "feature" 16 | Bug Fixes: 17 | - "bug" 18 | Enhancements: 19 | - "enhancement" 20 | Internationalisation: 21 | - "i18n" 22 | Theme Meta: 23 | - "meta" 24 | Uncategorised: 25 | - "closed" 26 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Grav 4 | Copyright (c) 2016 MATHIEU CORNIC 5 | Copyright (c) 2017 Valere JEANTET 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | the Software, and to permit persons to whom the Software is furnished to do so, 12 | subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/archetypes/chapter.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | weight = 5 5 | chapter = true 6 | pre = "X. " 7 | +++ 8 | 9 | ### Chapter X 10 | 11 | # Some Chapter title 12 | 13 | Lorem Ipsum. -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | weight = 5 5 | +++ 6 | 7 | Lorem Ipsum. -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 MATHIEU CORNIC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Learn Theme for Hugo" 3 | --- 4 | 5 | # Hugo learn theme 6 | 7 | [Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**. 8 | 9 | This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP. 10 | 11 | {{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}}) 12 | {{% /notice %}} 13 | 14 | ## Main features 15 | 16 | * [Automatic Search]({{%relref "basics/configuration/_index.md#activate-search" %}}) 17 | * [Multilingual mode]({{%relref "cont/i18n/_index.md" %}}) 18 | * **Unlimited menu levels** 19 | * **Automatic next/prev buttons to navigate through menu entries** 20 | * [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}}) 21 | * [Attachments files]({{%relref "shortcodes/attachments.en.md" %}}) 22 | * [List child pages]({{%relref "shortcodes/children/_index.md" %}}) 23 | * [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt) 24 | * [Customizable look and feel and themes variants]({{%relref "basics/style-customization/_index.md"%}}) 25 | * [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}}) 26 | 27 | ![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) 28 | 29 | ## Contribute to this documentation 30 | Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it 31 | 32 | {{% notice info %}} 33 | Your modification will be deployed automatically when merged. 34 | {{% /notice %}} 35 | 36 | ## Documentation website 37 | This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn) 38 | 39 | {{% notice note %}} 40 | Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) 41 | {{% /notice %}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Learn Theme for Hugo" 3 | --- 4 | 5 | # Thème Hugo learn 6 | 7 | [Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**. 8 | 9 | Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP. 10 | 11 | {{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}}) 12 | {{% /notice %}} 13 | 14 | ## Fonctionnalités principales 15 | 16 | * [Recherche automatique]({{%relref "basics/configuration/_index.md#activer-recherche" %}}) 17 | * [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}}) 18 | * **Nombre de niveau infini dans le menu** 19 | * **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu** 20 | * [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}}) 21 | * [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}}) 22 | * [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}}) 23 | * [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt) 24 | * [Style configurable and variantes de couleurs]({{%relref "basics/style-customization/_index.md"%}}) 25 | * [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}}) 26 | 27 | ![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) 28 | 29 | ## Contribuer à cette documentation 30 | 31 | N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée. 32 | 33 | {{% notice info %}} 34 | Votre modification sera déployée automatiquement quand elle sera mergée. 35 | {{% /notice %}} 36 | 37 | ## Site de documentation 38 | 39 | Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn) 40 | 41 | {{% notice note %}} 42 | Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais) 43 | {{% /notice %}} 44 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Basics 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### Chapter 1 9 | 10 | # Basics 11 | 12 | Discover what this Hugo theme is all about and the core-concepts behind it. 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Démarrage 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### Chapitre 1 9 | 10 | # Démarrage 11 | 12 | Découvrez comment utiliser ce thème Hugo et apprenez-en les concepts 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 基础 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### 章节 1 9 | 10 | # 基础 11 | 12 | 了解该 Hugo 主题的特点以及背后的核心概念。 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/configuration/images/home_button_defaults.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/configuration/images/home_button_defaults.jpg -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Requirements 3 | weight: 10 4 | disableToc: true 5 | --- 6 | 7 | Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements. 8 | 9 | Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple. 10 | 11 | ![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) 12 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prérequis 3 | weight: 10 4 | disableToc: true 5 | --- 6 | 7 | Grâce à la simplicité d'Hugo, cette page est vide car il n'y a quasi pas de prérequis pour utiliser le thème. 8 | 9 | Téléchargez la dernière version du [binaire Hugo (> 0.25)](https://gohugo.io/getting-started/installing/) pour votre Système d'exploitation (Windows, Linux, Mac) : et c'est tout ! 10 | 11 | ![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) 12 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Content 3 | weight: 10 4 | chapter: true 5 | pre: "2. " 6 | --- 7 | 8 | ### Chapter 2 9 | 10 | # Content 11 | 12 | Find out how to create and organize your content quickly and intuitively. 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contenu 3 | weight: 10 4 | chapter: true 5 | pre: "2. " 6 | --- 7 | 8 | ### Chapitre 2 9 | 10 | # Contenu 11 | 12 | Découvrez comment créer et organiser votre contenu facilement et intuitivement. 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Archetypes 3 | weight: 10 4 | --- 5 | 6 | Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more: [archetypes](https://gohugo.io/content/archetypes/). 7 | 8 | It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences. 9 | 10 | ## Chapter {#archetypes-chapter} 11 | 12 | To create a Chapter page, run the following commands 13 | 14 | ``` 15 | hugo new --kind chapter /_index.md 16 | ``` 17 | 18 | It will create a page with predefined Front-Matter: 19 | 20 | ```markdown 21 | +++ 22 | title = "{{ replace .Name "-" " " | title }}" 23 | date = {{ .Date }} 24 | weight = 5 25 | chapter = true 26 | pre = "X. " 27 | +++ 28 | 29 | ### Chapter X 30 | 31 | # Some Chapter title 32 | 33 | Lorem Ipsum. 34 | ``` 35 | 36 | ## Default 37 | 38 | To create a default page, run either one of the following commands 39 | 40 | ``` 41 | # Either 42 | hugo new //_index.md 43 | # Or 44 | hugo new /.md 45 | ``` 46 | 47 | It will create a page with predefined Front-Matter: 48 | 49 | ```markdown 50 | +++ 51 | title = "{{ replace .Name "-" " " | title }}" 52 | date = {{ .Date }} 53 | weight = 5 54 | +++ 55 | 56 | Lorem Ipsum. 57 | ``` 58 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Archétypes 3 | weight: 10 4 | --- 5 | 6 | En utilisant la commande: `hugo new [chemin vers nouveau contenu]`, vous pouvez créer un nouveau fichier avec la date et le title automatiquement initialisé. Même si c'est une fonctionnalité intéressante, elle reste limitée pour les auteurs actifs qui ont besoin de mieux : les [archetypes](https://gohugo.io/content/archetypes/). 7 | 8 | Les archétypes sont des squelettes de pages préconfigurées avec un Front Matter par défaut. Merci de vous référer à la documentation pour connaitre les différents types de page. 9 | 10 | ## Chapitre {#archetypes-chapter} 11 | 12 | Pour créer un chapitre, lancez les commandes suivantes 13 | 14 | ``` 15 | hugo new --kind chapter /_index.md 16 | ``` 17 | 18 | Cela crééra une page avec le Front Matter suivant: 19 | 20 | ```markdown 21 | +++ 22 | title = "{{ replace .Name "-" " " | title }}" 23 | date = {{ .Date }} 24 | weight = 5 25 | chapter = true 26 | pre = "X. " 27 | +++ 28 | 29 | ### Chapter X 30 | 31 | # Some Chapter title 32 | 33 | Lorem Ipsum. 34 | ``` 35 | 36 | ## Défaut 37 | 38 | Pour créer une page classique, lancer l'une des deux commandes suivantes 39 | 40 | ``` 41 | # Soit 42 | hugo new //_index.md 43 | # Ou 44 | hugo new /.md 45 | ``` 46 | 47 | Cela crééra une page avec le Front Matter suivant: 48 | 49 | ```markdown 50 | +++ 51 | title = "{{ replace .Name "-" " " | title }}" 52 | date = {{ .Date }} 53 | weight = 5 54 | +++ 55 | 56 | Lorem Ipsum. 57 | ``` -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Multilingual and i18n 4 | weight: 30 5 | --- 6 | 7 | **Learn theme** is fully compatible with Hugo multilingual mode. 8 | 9 | It provides: 10 | 11 | - Translation strings for default values (English and French). Feel free to contribute ! 12 | - Automatic menu generation from multilingual content 13 | - In-browser language switching 14 | 15 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) 16 | 17 | ## Basic configuration 18 | 19 | After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file. 20 | 21 | For example with current French and English website. 22 | 23 | ```toml 24 | # English is the default language 25 | defaultContentLanguage = "en" 26 | # Force to have /en/my-page and /fr/my-page routes, even for default language. 27 | defaultContentLanguageInSubdir= true 28 | 29 | [Languages] 30 | [Languages.en] 31 | title = "Documentation for Hugo Learn Theme" 32 | weight = 1 33 | languageName = "English" 34 | 35 | [Languages.fr] 36 | title = "Documentation du thème Hugo Learn" 37 | weight = 2 38 | languageName = "Français" 39 | ``` 40 | 41 | Then, for each new page, append the *id* of the language to the file. 42 | 43 | - Single file `my-page.md` is split in two files: 44 | - in English: `my-page.en.md` 45 | - in French: `my-page.fr.md` 46 | - Single file `_index.md` is split in two files: 47 | - in English: `_index.en.md` 48 | - in French: `_index.fr.md` 49 | 50 | {{% notice info %}} 51 | Be aware that only translated pages are displayed in menu. It's not replaced with default language content. 52 | {{% /notice %}} 53 | 54 | {{% notice tip %}} 55 | Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too. 56 | {{% /notice %}} 57 | 58 | ## Overwrite translation strings 59 | 60 | Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values. 61 | 62 | To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml` 63 | 64 | By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/matcornic/hugo-theme-learn/pulls) to the theme ! 65 | 66 | ## Disable language switching 67 | 68 | Switching the language in the browser is a great feature, but for some reasons you may want to disable it. 69 | 70 | Just set `disableLanguageSwitchingButton=true` in your `config.toml` 71 | 72 | ```toml 73 | [params] 74 | # When using mulitlingual website, disable the switch language button. 75 | disableLanguageSwitchingButton = true 76 | ``` 77 | 78 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/icons.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Icons and logos 3 | weight: 27 4 | --- 5 | 6 | The Learn theme for Hugo loads the [**Font Awesome**](https://fontawesome.com) library, allowing you to easily display any icon or logo available in the Font Awesome free collection. 7 | 8 | ## Finding an icon 9 | 10 | Browse through the available icons in the [Font Awesome Gallery](https://fontawesome.com/icons?d=gallery&m=free). Notice that the **free** filter is enabled, as only the free icons are available by default. 11 | 12 | Once on the Font Awesome page for a specific icon, for example the page for the [heart](https://fontawesome.com/icons/heart?style=solid), copy the HTML reference and paste into the markdown content. 13 | 14 | The HTML to include the heart icon is: 15 | 16 | ``` 17 | 18 | ``` 19 | 20 | ## Including in markdown 21 | 22 | Paste the `` HTML into markup and Font Awesome will load the relevant icon. 23 | 24 | ``` 25 | Built with from Grav and Hugo 26 | ``` 27 | 28 | Which appears as 29 | 30 | Built with from Grav and Hugo 31 | 32 | ## Customising icons 33 | 34 | Font Awesome provides many ways to modify the icon 35 | 36 | * Change colour (by default the icon will inherit the parent colour) 37 | * Increase or decrease size 38 | * Rotate 39 | * Combine with other icons 40 | 41 | Check the full documentation on [web fonts with CSS](https://fontawesome.com/how-to-use/web-fonts-with-css) for more. 42 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2020-06-01T13:31:12+01:00 3 | title: Code highlighting 4 | weight: 16 5 | --- 6 | 7 | Learn theme uses [highlight.js](https://highlightjs.org/) to provide code syntax highlighting. 8 | 9 | ## Markdown syntax 10 | 11 | Wrap the code block with three backticks and the name of the language. Highlight will try to auto detect the language if one is not provided. 12 | 13 | 14 | ```plaintext 15 | ```json 16 | [ 17 | { 18 | "title": "apples", 19 | "count": [12000, 20000], 20 | "description": {"text": "...", "sensitive": false} 21 | }, 22 | { 23 | "title": "oranges", 24 | "count": [17500, null], 25 | "description": {"text": "...", "sensitive": false} 26 | } 27 | ] 28 | ``` 29 | ``` 30 | 31 | 32 | Renders to: 33 | 34 | ```json 35 | [ 36 | { 37 | "title": "apples", 38 | "count": [12000, 20000], 39 | "description": {"text": "...", "sensitive": false} 40 | }, 41 | { 42 | "title": "oranges", 43 | "count": [17500, null], 44 | "description": {"text": "...", "sensitive": false} 45 | } 46 | ] 47 | ``` 48 | 49 | ## Supported languages 50 | 51 | Learn theme ships with its own version of highlight.js to support offline browsing. The included package supports 38 common languages, as described on the [highlight.js download page](https://highlightjs.org/download/). 52 | 53 | ## Identifying failed language detection 54 | 55 | Highlight will write a warning to the browser console if a requested language was not found. For example, the following code block references an imaginary language `foo`. An error will be output to the console on this page. 56 | 57 | ```plaintext 58 | ```foo 59 | bar 60 | ``` 61 | ``` 62 | 63 | ```nohighlight 64 | Could not find the language 'foo', did you forget to load/include a language module?(anonymous) @ highlight.pack.js 65 | ``` 66 | 67 | ## Supporting additional languages 68 | 69 | To support languages other than the 38 common languages included in the default highlight.js you will need to download your own version of highlight.js and add it to your site content. 70 | 71 | ### Download custom highlight.js 72 | 73 | Visit [https://highlightjs.org/download/](https://highlightjs.org/download/) and select your desired language support. Note that more languages means greater package size. 74 | 75 | ### Add custom highlight.js to static resources 76 | 77 | Inside the zip archive downloaded from highlight.js extract the file named `highlight.pack.js`. Move this file to the **new** location 78 | 79 | ```nohighlight 80 | static/js/highlight.pack.js 81 | ``` 82 | 83 | **Do not** replace the existing file at `themes/hugo-theme-learn/static/js/highlight.pack.js`. 84 | 85 | Including the file in the correct path will override the theme default highlight.pack.js and prevent issues caused in the future if the theme default file is updated. 86 | 87 | ## Further usage information 88 | 89 | See [https://highlightjs.org/usage/](https://highlightjs.org/usage/) 90 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/tags.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2018-11-29T08:41:44+01:00 3 | title: Tags 4 | weight: 40 5 | tags: ["documentation", "tutorial"] 6 | --- 7 | 8 | *Learn theme* support one default taxonomy of gohugo: the *tag* feature. 9 | 10 | ## Configuration 11 | 12 | Just add tags to any page: 13 | 14 | ```markdown 15 | --- 16 | date: 2018-11-29T08:41:44+01:00 17 | title: Theme tutorial 18 | weight: 15 19 | tags: ["tutorial", "theme"] 20 | --- 21 | ``` 22 | 23 | ## Behavior 24 | 25 | 26 | The tags are displayed at the top of the page, in their insertion order. 27 | 28 | Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag. 29 | 30 | ## List all the tags 31 | 32 | In the `config.toml` file you can add a shortcut to display all the tags 33 | 34 | ```toml 35 | [[menu.shortcuts]] 36 | name = " Tags" 37 | url = "/tags" 38 | weight = 30 39 | ``` -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/cont/tags.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2018-11-29T08:41:44+01:00 3 | title: Tags 4 | weight: 40 5 | tags: ["documentation", "tutorial"] 6 | --- 7 | 8 | 9 | Le *thème Learn* supporte une des taxonomy par défaut de GoHugo : les tags. 10 | 11 | ## Configuration 12 | 13 | Il suffit d'ajouter un tableau de tags sur la page : 14 | 15 | ```markdown 16 | --- 17 | date: 2018-11-29T08:41:44+01:00 18 | title: Tutoriel pour le thème 19 | weight: 15 20 | tags: ["tutoriel", "theme"] 21 | --- 22 | ``` 23 | 24 | ## Comportement 25 | 26 | Les tags sont affichés en haut de la page, dans l'ordre dans lequel ils ont été saisis. 27 | 28 | Chaque tag est un lien vers une page *Taxonomy*, qui affiche tous les article avec ce tag. 29 | 30 | 31 | ## Liste des tags 32 | 33 | Il est possible de rajouter un raccourci dans le fichier `config.toml` afin d'afficher une page listant tous les tags 34 | 35 | ```toml 36 | [[menu.shortcuts]] 37 | name = " Tags" 38 | url = "/tags" 39 | weight = 30 40 | ``` -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/credits.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Credits 3 | disableToc: true 4 | --- 5 | 6 | ## Contributors 7 | 8 | Thanks to them for making Open Source Software a better place ! 9 | 10 | {{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} 11 | 12 | And a special thanks to [@vjeantet](https://github.com/vjeantet) for his work on [docdock](https://github.com/vjeantet/hugo-theme-docdock), a fork of hugo-theme-learn. v2.0.0 of this theme is inspired by his work. 13 | 14 | ## Packages and libraries 15 | * [mermaid](https://knsv.github.io/mermaid) - generation of diagram and flowchart from text in a similar manner as markdown 16 | * [font awesome](http://fontawesome.io/) - the iconic font and CSS framework 17 | * [jQuery](https://jquery.com) - The Write Less, Do More, JavaScript Library 18 | * [lunr](https://lunrjs.com) - Lunr enables you to provide a great search experience without the need for external, server-side, search services... 19 | * [horsey](https://bevacqua.github.io/horsey/) - Progressive and customizable autocomplete component 20 | * [clipboard.js](https://zenorocha.github.io/clipboard.js) - copy text to clipboard 21 | * [highlight.js](https://highlightjs.org) - Javascript syntax highlighter 22 | * [modernizr](https://modernizr.com) - A JavaScript toolkit that allows web developers to use new CSS3 and HTML5 features while maintaining a fine level of control over browsers that don't support 23 | 24 | ## Tooling 25 | 26 | * [Netlify](https://www.netlify.com) - Continuous deployement and hosting of this documentation 27 | * [Hugo](https://gohugo.io/) 28 | 29 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/credits.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Crédits 3 | disableToc: true 4 | --- 5 | 6 | ## Contributeurs 7 | 8 | Merci à eux de rendre le monde Open Source meilleur ! 9 | 10 | {{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} 11 | 12 | Et un grand merci à [@vjeantet](https://github.com/vjeantet) pour son travail sur [docdock](https://github.com/vjeantet/hugo-theme-docdock), un fork de _hugo-theme-learn_. La v2.0.0 du thème est en grande partie inspirée de son travail. 13 | 14 | ## Packages et librairies 15 | * [mermaid](https://knsv.github.io/mermaid) - géneration de diagrames et graphiques à partir de texte similaire à Markdown 16 | * [font awesome](http://fontawesome.io/) - Le framework de polices iconiques 17 | * [jQuery](https://jquery.com) - La plus connue des librairies Javascript 18 | * [lunr](https://lunrjs.com) - Lunr fournit des fonctions de recherche sans service externe 19 | * [horsey](https://bevacqua.github.io/horsey/) - Autocomplétion de composants (utiliser pour les suggestions de recherche) 20 | * [clipboard.js](https://zenorocha.github.io/clipboard.js) - Copier le texte dans le presse-papier 21 | * [highlight.js](https://highlightjs.org) - Mise en valeur de syntaxes 22 | * [modernizr](https://modernizr.com) - Une boite à outil Javascript qui permet aux développeurs d'utiliser les dernières fonctionnalités de CSS et HTML5, même sur de vieux navigateurs. 23 | 24 | ## Outils 25 | 26 | * [Netlify](https://www.netlify.com) - Déploiement continue et hébergement de cette documentation 27 | * [Hugo](https://gohugo.io/) 28 | 29 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Shortcodes 4 | pre: "3. " 5 | weight: 15 6 | --- 7 | 8 | Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities. 9 | 10 | But this happens to be a bad idea. Everyone uses Markdown because it's pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible. 11 | 12 | To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page. 13 | 14 | **Hugo-theme-learn** provides multiple shortcodes on top of existing ones. 15 | 16 | {{%children style="h2" description="true" %}} 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Shortcodes 4 | pre: "3. " 5 | weight: 15 6 | --- 7 | 8 | Hugo utilise Markdown pour son format simple. Cependant, il y a beaucoup de chose que Markdown ne supporte pas bien. On pourrait utiliser du HTML pur pour améliorer les capacité du Markdown. 9 | 10 | Mais c'est probablement une mauvaise idée. Tout le monde utilise le Markdown parce que c'est pur et simple à lire même lorsqu'il est affiché en texte brut. Vous devez éviter le HTML autant que possible pour garder le contenu simple. 11 | 12 | Cependant, pour éviter les limitations, Hugo a créé les [shortcodes](https://gohugo.io/extras/shortcodes/). Un shortcode est un bout de code (*snippet*) dans une page. 13 | 14 | **Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant. 15 | 16 | {{%children style="h2" description="true" %}} 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attachments 3 | description : "The Attachments shortcode displays a list of files attached to a page." 4 | --- 5 | 6 | The Attachments shortcode displays a list of files attached to a page. 7 | 8 | {{% attachments /%}} 9 | 10 | ## Usage 11 | 12 | The shortcurt lists files found in a **specific folder**. 13 | Currently, it support two implementations for pages 14 | 15 | 1. If your page is a markdown file, attachements must be placed in a **folder** named like your page and ending with **.files**. 16 | 17 | > * content 18 | > * _index.md 19 | > * page.files 20 | > * attachment.pdf 21 | > * page.md 22 | 23 | 2. If your page is a **folder**, attachements must be placed in a nested **'files'** folder. 24 | 25 | > * content 26 | > * _index.md 27 | > * page 28 | > * index.md 29 | > * files 30 | > * attachment.pdf 31 | 32 | Be aware that if you use a multilingual website, you will need to have as many folders as languages. 33 | 34 | That's all! 35 | 36 | ### Parameters 37 | 38 | | Parameter | Default | Description | 39 | |:--|:--|:--| 40 | | title | "Attachments" | List's title | 41 | | style | "" | Choose between "orange", "grey", "blue" and "green" for nice style | 42 | | pattern | ".*" | A regular expressions, used to filter the attachments by file name.

The **pattern** parameter value must be [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). 43 | 44 | For example: 45 | 46 | * To match a file suffix of 'jpg', use **.*jpg** (not *.jpg). 47 | * To match file names ending in 'jpg' or 'png', use **.*(jpg|png)** 48 | 49 | ### Examples 50 | 51 | #### List of attachments ending in pdf or mp4 52 | 53 | 54 | {{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}} 55 | 56 | renders as 57 | 58 | {{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}} 59 | 60 | #### Colored styled box 61 | 62 | {{%/*attachments style="orange" /*/%}} 63 | 64 | renders as 65 | 66 | {{% attachments style="orange" /%}} 67 | 68 | 69 | {{%/*attachments style="grey" /*/%}} 70 | 71 | renders as 72 | 73 | {{% attachments style="grey" /%}} 74 | 75 | {{%/*attachments style="blue" /*/%}} 76 | 77 | renders as 78 | 79 | {{% attachments style="blue" /%}} 80 | 81 | {{%/*attachments style="green" /*/%}} 82 | 83 | renders as 84 | 85 | {{% attachments style="green" /%}} 86 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attachments (Pièces jointes) 3 | description : "The Attachments shortcode displays a list of files attached to a page." 4 | --- 5 | 6 | Le shortcode *Attachments* affiche une liste de pièces jointes d'une page. 7 | 8 | {{% attachments /%}} 9 | 10 | ## Utilisation 11 | 12 | Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique** 13 | A l'heure actuelle, il supporte deux implémentations 14 | 15 | 1. Si votre page est un fichier Markdown, les pièces jointes doivent être placée dans un **dossier** nommé comme le nom de la page et suffixé par **.files**. 16 | 17 | > * content 18 | > * _index.md 19 | > * page.files 20 | > * attachment.pdf 21 | > * page.md 22 | 23 | 2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**. 24 | 25 | > * content 26 | > * _index.md 27 | > * page 28 | > * index.md 29 | > * files 30 | > * attachment.pdf 31 | 32 | Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues. 33 | 34 | C'est tout ! 35 | 36 | ### Paramètres 37 | 38 | | Paramètre | Défaut | Description | 39 | |:--|:--|:--| 40 | | title | "Pièces jointes" | Titre de la liste | 41 | | style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa | 42 | | pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier.

Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression). 43 | 44 | Par exemple: 45 | 46 | * Pour trouver les fichiers avec le suffixe 'jpg', utilisez **.*jpg** (pas *.jpg). 47 | * Pour trouver les fichiers avec les suffixe 'jpg' ou 'png', utilisez **.*(jpg|png)** 48 | 49 | ### Exemples 50 | 51 | #### Lister les pièces jointes de type pdf ou mp4 52 | 53 | 54 | {{%/*attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/*/%}} 55 | 56 | s'affiche comme 57 | 58 | {{%attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/%}} 59 | 60 | #### Modifier le style 61 | 62 | {{%/*attachments style="orange" /*/%}} 63 | 64 | s'affiche comme 65 | 66 | {{% attachments style="orange" /%}} 67 | 68 | 69 | {{%/*attachments style="grey" /*/%}} 70 | 71 | s'affiche comme 72 | 73 | {{% attachments style="grey" /%}} 74 | 75 | {{%/*attachments style="blue" /*/%}} 76 | 77 | s'affiche comme 78 | 79 | {{% attachments style="blue" /%}} 80 | 81 | {{%/*attachments style="green" /*/%}} 82 | 83 | s'affiche comme 84 | 85 | {{% attachments style="green" /%}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Button 3 | description : "Nice buttons on your page." 4 | --- 5 | 6 | A button is a just a clickable button with optional icon. 7 | 8 | ``` 9 | {{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}} 10 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Get Grav with icon{{%/* /button */%}} 11 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}} 12 | ``` 13 | 14 | {{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}} 15 | {{% button href="https://getgrav.org/" icon="fas fa-download" %}}Get Grav with icon{{% /button %}} 16 | {{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}} 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Button (Bouton) 3 | description : "De beaux boutons sur votre page." 4 | --- 5 | 6 | Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle. 7 | 8 | ``` 9 | {{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}} 10 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}} 11 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}} 12 | ``` 13 | 14 | {{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}} 15 | {{% button href="https://getgrav.org/" icon="fas fa-download" %}}Téléchargez Grav avec icône{{% /button %}} 16 | {{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}} 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Children 3 | description : List the child pages of a page 4 | --- 5 | 6 | Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages. 7 | 8 | ## Usage 9 | 10 | | Parameter | Default | Description | 11 | |:--|:--|:--| 12 | | page | _current_ | Specify the page name (section name) to display children for | 13 | | style | "li" | Choose the style used to display descendants. It could be any HTML tag name | 14 | | showhidden | "false" | When true, child pages hidden from the menu will be displayed | 15 | | description | "false" | Allows you to include a short text under each page in the list. When no description exists for the page, children shortcode takes the first 70 words of your content. [Read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/) | 16 | | depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages. **Tips:** set 999 to get all descendants | 17 | | sort | none | Sort children by **Weight** - to sort on menu order, **Name** - to sort alphabetically on menu label, **Identifier** - to sort alphabetically on identifier set in frontmatter, and **URL** - to sort by URL | 18 | 19 | ## Demo 20 | 21 | {{%/* children */%}} 22 | 23 | {{% children %}} 24 | 25 | {{%/* children description="true" */%}} 26 | 27 | {{%children description="true" %}} 28 | 29 | {{%/* children depth="3" showhidden="true" */%}} 30 | 31 | {{% children depth="3" showhidden="true" %}} 32 | 33 | {{%/* children style="h2" depth="3" description="true" */%}} 34 | 35 | {{% children style="h2" depth="3" description="true" %}} 36 | 37 | {{%/* children style="div" depth="999" */%}} 38 | 39 | {{% children style="div" depth="999" %}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Children (Pages filles) 3 | description : Liste les pages filles de la page 4 | --- 5 | 6 | Utilisez le shortcode *children* pour lister les pages filles de la page et tous ses déscendants (pages filles de pages filles). Par défaut, le shortcode affiche des liens vers les pages filles. 7 | 8 | ## Utilisation 9 | 10 | | Paramètre | Défaut | Description | 11 | |:--|:--|:--| 12 | | page | _current_ | Spécifie le nom de la page (nom de la section) à afficher | 13 | | style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML | 14 | | showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même | 15 | | description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste.
quand aucune description existe pour la page, le shortcode prend les 70 premiers mots du contenu. [plus d'infos sur gohugo.io](https://gohugo.io/content/summaries/) | 16 | | depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels.
**Astuce:** Utilisez 999 pour avoir tous les descendants| 17 | | sort | | Tri les pages filles par
  • Weight - Poids
  • Name - Nom
  • Identifier - Trier alphabétiquement par identifiant configuré dans le front matter
  • URL - URL
  • | 18 | 19 | ## Démo 20 | 21 | {{%/* children */%}} 22 | 23 | {{% children %}} 24 | 25 | {{%/* children description="true" */%}} 26 | 27 | {{%children description="true" %}} 28 | 29 | {{%/* children depth="3" showhidden="true" */%}} 30 | 31 | {{% children depth="3" showhidden="true" %}} 32 | 33 | {{%/* children style="h2" depth="3" description="true" */%}} 34 | 35 | {{% children style="h2" depth="3" description="true" %}} 36 | 37 | {{%/* children style="div" depth="999" */%}} 38 | 39 | {{% children style="div" depth="999" %}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 2" 3 | description = "" 4 | +++ 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 7 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 8 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 9 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 10 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 11 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 2" 3 | description = "" 4 | +++ 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 7 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 8 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 9 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 10 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 11 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test 3" 3 | description = "This is a page test" 4 | +++ 5 | 6 | This is a test 3 demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test 3" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo test 3 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 3" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page, not displayed in the menu -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 3" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 4" 3 | description = "This is a demo child page" 4 | hidden = true 5 | +++ 6 | 7 | This is a demo child page, not displayed in the menu -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 4" 3 | description = "Ceci est une page test" 4 | hidden = true 5 | +++ 6 | 7 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test" 3 | description = "This is a page test" 4 | +++ 5 | 6 | This is a test demo child page -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Expand 3 | description : "Displays an expandable/collapsible section of text on your page" 4 | --- 5 | 6 | The Expand shortcode displays an expandable/collapsible section of text on your page. 7 | Here is an example 8 | 9 | {{%expand%}} 10 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 11 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 12 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 13 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 14 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 15 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 16 | {{%/expand%}} 17 | 18 | 19 | ## Usage 20 | 21 | 22 | this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...") 23 | 24 | {{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}} 25 | 26 | {{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}} 27 | 28 | # Demo 29 | 30 | {{%/*expand*/%}} 31 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 32 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 33 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 34 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 35 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 36 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 37 | {{%/* /expand*/%}} 38 | 39 | 40 | {{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 41 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 42 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 43 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 44 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 45 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Expand 3 | description : "Affiche une section de texte qui se plie et se déplie" 4 | --- 5 | 6 | Le shortcode *Expand* affiche une section de texte qui se plie et se déplie. 7 | Ci-dessous un exemple. 8 | 9 | {{%expand%}} 10 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 11 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 12 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 13 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 14 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 15 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 16 | {{%/expand%}} 17 | 18 | 19 | ## Utilisation 20 | 21 | 22 | Ce shortcode prends exactement un paramètre optionel pour définir le texte à côté de l'icone. (valeur par défaut est "Déroulez-moi...") 23 | 24 | {{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}} 25 | 26 | {{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}} 27 | 28 | # Demo 29 | 30 | {{%/*expand*/%}} 31 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 32 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 33 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 34 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 35 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 36 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 37 | {{%/* /expand*/%}} 38 | 39 | 40 | {{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 41 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 42 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 43 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 44 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 45 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Notice 3 | description : "Disclaimers to help you structure your page" 4 | --- 5 | 6 | The notice shortcode shows 4 types of disclaimers to help you structure your page. 7 | 8 | ### Note 9 | 10 | ``` 11 | {{%/* notice note */%}} 12 | A notice disclaimer 13 | {{%/* /notice */%}} 14 | ``` 15 | 16 | renders as 17 | 18 | {{% notice note %}} 19 | A notice disclaimer 20 | {{% /notice %}} 21 | 22 | ### Info 23 | 24 | ``` 25 | {{%/* notice info */%}} 26 | An information disclaimer 27 | {{%/* /notice */%}} 28 | ``` 29 | 30 | renders as 31 | 32 | {{% notice info %}} 33 | An information disclaimer 34 | {{% /notice %}} 35 | 36 | ### Tip 37 | 38 | ``` 39 | {{%/* notice tip */%}} 40 | A tip disclaimer 41 | {{%/* /notice */%}} 42 | ``` 43 | 44 | renders as 45 | 46 | {{% notice tip %}} 47 | A tip disclaimer 48 | {{% /notice %}} 49 | 50 | ### Warning 51 | 52 | ``` 53 | {{%/* notice warning */%}} 54 | A warning disclaimer 55 | {{%/* /notice */%}} 56 | ``` 57 | 58 | renders as 59 | 60 | {{% notice warning %}} 61 | A warning disclaimer 62 | {{% /notice %}} 63 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Notice 3 | description : "Message pour vous aider à structurer votre contenu" 4 | --- 5 | 6 | Le shortcode *Notice* permet d'afficher 4 types de message pour vous aider à structurer votre contenu. 7 | 8 | ### Note 9 | 10 | ``` 11 | {{%/* notice note */%}} 12 | Une notice de type *note* 13 | {{%/* /notice */%}} 14 | ``` 15 | 16 | s'affiche comme 17 | 18 | {{% notice note %}} 19 | Une notice de type *note* 20 | {{% /notice %}} 21 | 22 | ### Info 23 | 24 | ``` 25 | {{%/* notice info */%}} 26 | Une notice de type *info* 27 | {{%/* /notice */%}} 28 | ``` 29 | 30 | s'affiche comme 31 | 32 | {{% notice info %}} 33 | Une notice de type *info* 34 | {{% /notice %}} 35 | 36 | ### Tip 37 | 38 | ``` 39 | {{%/* notice tip */%}} 40 | Une notice de type *tip* 41 | {{%/* /notice */%}} 42 | ``` 43 | 44 | s'affiche comme 45 | 46 | {{% notice tip %}} 47 | Une notice de type *tip* 48 | {{% /notice %}} 49 | 50 | ### Warning 51 | 52 | ``` 53 | {{%/* notice warning */%}} 54 | Une notice de type *warning* 55 | {{%/* /notice */%}} 56 | ``` 57 | 58 | s'affiche comme 59 | 60 | {{% notice warning %}} 61 | Une notice de type *warning* 62 | {{% /notice %}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Site param 3 | description : "Get value of site params variables in your page." 4 | --- 5 | 6 | `siteparam` shortcode is used to help you print values of site params. 7 | 8 | For instance, in this current site, the `editURL` variable is used in `config.toml` 9 | 10 | ```toml 11 | [params] 12 | editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" 13 | ``` 14 | 15 | Use the `siteparam` shortcode to display its value. 16 | 17 | ``` 18 | `editURL` Value : {{%/* siteparam "editURL" */%}} 19 | ``` 20 | 21 | is displayed as 22 | 23 | `editURL` Value : {{% siteparam "editURL" %}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Site param 3 | description : "Afficher la valeur d'un paramètre global du site dans votre page" 4 | --- 5 | 6 | Les shortcode `siteparam` est utilisé pour vous aider à afficher des valeurs provenant des paramètres globaux du site. 7 | 8 | Par exemple, dans ce site, le paramètre `editURL` est utilisé dans le fichier `config.toml` 9 | 10 | ```toml 11 | [params] 12 | editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" 13 | ``` 14 | 15 | Utilisez le shortcode `siteparam` pour affichier sa valeur. 16 | 17 | ``` 18 | Valeur de `editURL` : {{%/* siteparam "editURL" */%}} 19 | ``` 20 | 21 | s'affiche comme 22 | 23 | Valeur de `editURL` : {{% siteparam "editURL" %}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/showcase.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Showcase 3 | disableToc: true 4 | --- 5 | 6 | #### [TAT](https://ovh.github.io/tat/overview/) by OVH 7 | ![TAT image](/images/showcase/tat.png?width=50pc) 8 | 9 | #### [Tshark.dev](https://tshark.dev) by Ross Jacobs 10 | ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) 11 | 12 | #### [inteliver](https://docs.inteliver.com) by Amir Lavasani 13 | ![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vitrine 3 | disableToc: true 4 | slug: vitrine 5 | --- 6 | 7 | #### [TAT](https://ovh.github.io/tat/overview/) par OVH 8 | ![TAT image](/images/showcase/tat.png?width=50pc) 9 | 10 | #### [Tshark.dev](https://tshark.dev) par Ross Jacobs 11 | ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) 12 | 13 | #### [inteliver](https://docs.inteliver.com) by Amir Lavasani 14 | ![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/layouts/partials/custom-footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/layouts/partials/menu-footer.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | Download 4 | 5 | 6 | Star 7 | 8 | 9 | Fork 10 | 11 |

    Built with from Grav and Hugo

    12 |
    13 | 14 | 15 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/layouts/shortcodes/ghcontributors.html: -------------------------------------------------------------------------------- 1 | 22 |
    23 | {{ $url := .Get 0 }} 24 | {{ range getJSON $url }} 25 |
    26 | 27 | 28 | {{.contributions}} commits 29 |
    30 | {{ end }} 31 |
    -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/ar.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "...البحث" 3 | 4 | [Clear-History] 5 | other = "مسح السجل" 6 | 7 | [Attachments-label] 8 | other = "مرفقات" 9 | 10 | [title-404] 11 | other = "خطأ" 12 | 13 | [message-404] 14 | other = ".¯\\_(ツ)_/¯أوبس. يبدو أن هذه الصفحة غير موجودة" 15 | 16 | [Go-to-homepage] 17 | other = "الذهاب إلى الصفحة الرئيسية" 18 | 19 | [Edit-this-page] 20 | other = "تعديل هذه الصفحة" 21 | 22 | [Shortcuts-Title] 23 | other = "المزيد" 24 | 25 | [Expand-title] 26 | other = "...قم بتوسيع" 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/de.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Suchen..." 3 | 4 | [Clear-History] 5 | other = "Verlauf löschen" 6 | 7 | [Attachments-label] 8 | other = "Anhänge" 9 | 10 | [title-404] 11 | other = "Fehler" 12 | 13 | [message-404] 14 | other = "Huch. Diese Seite scheint nicht zu existieren ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Gehe zur Homepage" 18 | 19 | [Edit-this-page] 20 | other = "Bearbeite diese Seite" 21 | 22 | [Shortcuts-Title] 23 | other = "Mehr" 24 | 25 | [Expand-title] 26 | other = "Erweitere mich..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/en.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Search..." 3 | 4 | [Clear-History] 5 | other = "Clear History" 6 | 7 | [Attachments-label] 8 | other = "Attachments" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Woops. Looks like this page doesn't exist ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Go to homepage" 18 | 19 | [Edit-this-page] 20 | other = "Edit this page" 21 | 22 | [Shortcuts-Title] 23 | other = "More" 24 | 25 | [Expand-title] 26 | other = "Expand me..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/es.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Buscar..." 3 | 4 | [Clear-History] 5 | other = "Borrar Historial" 6 | 7 | [Attachments-label] 8 | other = "Adjuntos" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Ups. Parece que la página no existe ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ir al inicio" 18 | 19 | [Edit-this-page] 20 | other = "Editar esta página" 21 | 22 | [Shortcuts-Title] 23 | other = "Más" 24 | 25 | [Expand-title] 26 | other = "Expandir..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/fr.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Rechercher..." 3 | 4 | [Clear-History] 5 | other = "Supprimer l'historique" 6 | 7 | [Attachments-label] 8 | other = "Pièces jointes" 9 | 10 | [title-404] 11 | other = "Erreur" 12 | 13 | [message-404] 14 | other = "Oups. On dirait que cette page n'existe pas ¯\\_(ツ)_/¯" 15 | 16 | [Go-to-homepage] 17 | other = "Vers la page d'accueil" 18 | 19 | [Edit-this-page] 20 | other = "Modifier la page" 21 | 22 | [Shortcuts-Title] 23 | other = "Aller plus loin" 24 | 25 | [Expand-title] 26 | other = "Déroulez-moi..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "ko" -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/hi.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "खोजे..." 3 | 4 | [Clear-History] 5 | other = "इतिहास मिटाएँ" 6 | 7 | [Attachments-label] 8 | other = "संलग्नंक (अटैचमेंट)" 9 | 10 | [title-404] 11 | other = "त्रुटि" 12 | 13 | [message-404] 14 | other = "यह पृष्ठ अभि अनुपलब्ध है!" 15 | 16 | [Go-to-homepage] 17 | other = "मुख्य पृष्ठ पर जाऐ" 18 | 19 | [Edit-this-page] 20 | other = "यह पृष्ठ संपादित करें" 21 | 22 | [Shortcuts-Title] 23 | other = "अधिक सामग्री दिखाएं" 24 | 25 | [Expand-title] 26 | other = "विस्तार करे..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/id.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Telusuri..." 3 | 4 | [Clear-History] 5 | other = "Bersihkan Riwayat" 6 | 7 | [Attachments-label] 8 | other = "Lampiran" 9 | 10 | [title-404] 11 | other = "Kesalahan" 12 | 13 | [message-404] 14 | other = "Oops. Sepertinya halaman ini tidak ada ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ke halaman depan" 18 | 19 | [Edit-this-page] 20 | other = "Edit halaman ini" 21 | 22 | [Shortcuts-Title] 23 | other = "Lainnya" 24 | 25 | [Expand-title] 26 | other = "Bentangkan..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/ja.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "検索..." 3 | 4 | [Clear-History] 5 | other = "履歴削除" 6 | 7 | [Attachments-label] 8 | other = "添付" 9 | 10 | [title-404] 11 | other = "エラー" 12 | 13 | [message-404] 14 | other = "おっと。ページが見当たりません。 ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "ホームページへ行く" 18 | 19 | [Edit-this-page] 20 | other = "このページを編集" 21 | 22 | [Shortcuts-Title] 23 | other = "更に" 24 | 25 | [Expand-title] 26 | other = "開く..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/nl.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Zoeken..." 3 | 4 | [Clear-History] 5 | other = "Wis geschiedenis" 6 | 7 | [Attachments-label] 8 | other = "Bijlagen" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Blijkbaar bestaat deze pagina niet ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Naar startpagina" 18 | 19 | [Edit-this-page] 20 | other = "Deze pagina bewerken" 21 | 22 | [Shortcuts-Title] 23 | other = "Snelkoppelingen" 24 | 25 | [Expand-title] 26 | other = "Lees meer..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/pt.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Procurar..." 3 | 4 | [Clear-History] 5 | other = "Limpar Histórico" 6 | 7 | [Attachments-label] 8 | other = "Anexos" 9 | 10 | [title-404] 11 | other = "Erro" 12 | 13 | [message-404] 14 | other = "Ops. Parece que a página não existe ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ir para o início" 18 | 19 | [Edit-this-page] 20 | other = "Editar esta página" 21 | 22 | [Shortcuts-Title] 23 | other = "Mais" 24 | 25 | [Expand-title] 26 | other = "Expandir..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/ru.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Поиск..." 3 | 4 | [Clear-History] 5 | other = "Очистить историю" 6 | 7 | [Attachments-label] 8 | other = "Присоединенные файлы" 9 | 10 | [title-404] 11 | other = "Ошибка" 12 | 13 | [message-404] 14 | other = "Упс. Выглядит будто такой страницы нет ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Перейти на главную" 18 | 19 | [Edit-this-page] 20 | other = "Редактировать" 21 | 22 | [Shortcuts-Title] 23 | other = "Еще" 24 | 25 | [Expand-title] 26 | other = "Развернуть..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "килобайт" -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/tr.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Ara..." 3 | 4 | [Clear-History] 5 | other = "Geçmişi Temizle" 6 | 7 | [Attachments-label] 8 | other = "Ekler" 9 | 10 | [title-404] 11 | other = "Hata" 12 | 13 | [message-404] 14 | other = "Uups. Görünüşe göre böyle bir sayfa yok ¯\\_(ツ)_/¯" 15 | 16 | [Go-to-homepage] 17 | other = "Anasayfaya dön" 18 | 19 | [Edit-this-page] 20 | other = "Sayfayı düzenle" 21 | 22 | [Shortcuts-Title] 23 | other = "Dahası Var" 24 | 25 | [Expand-title] 26 | other = "Genişlet..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/i18n/zh-cn.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "搜索..." 3 | 4 | [Clear-History] 5 | other = "清理历史记录" 6 | 7 | [Attachments-label] 8 | other = "附件" 9 | 10 | [title-404] 11 | other = "错误" 12 | 13 | [message-404] 14 | other = "哎哟。 看起来这个页面不存在 ¯\\_(ツ)_/¯。" 15 | 16 | [Go-to-homepage] 17 | other = "转到主页" 18 | 19 | [Edit-this-page] 20 | other = "编辑当前页" 21 | 22 | [Shortcuts-Title] 23 | other = "更多" 24 | 25 | [Expand-title] 26 | other = "展开" 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/images/screenshot.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/images/tn.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}} 6 | {{ .Scratch.Get "title" }} 7 | 8 | {{ $assetBusting := not .Site.Params.disableAssetsBusting }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{with .Site.Params.themeVariant}} 17 | 18 | {{end}} 19 | 34 | {{ partial "custom-header.html" . }} 35 | 36 | 37 | 38 | 39 |
    40 |
    41 |
    42 |
    43 |

    {{T "title-404"}}

    44 |

    45 |

    46 |

    {{T "message-404"}}

    47 |

    48 |

    {{T "Go-to-homepage"}}

    49 |

    Page not found!

    50 |
    51 |
    52 | 53 |
    54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{ if eq .Kind "section" }} 4 | {{ .Content }} 5 | {{end}} 6 | 7 | {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }} 8 |
      9 | {{ range .Pages }} 10 |
    • {{.Title}}
    • 11 | {{ end }} 12 |
    13 | {{end}} 14 | 15 |
    16 | {{with .Params.LastModifierDisplayName}} 17 | {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} 18 | 19 | {{end}} 20 |
    21 | 22 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{ .Content }} 4 | 5 |
    6 | {{with .Params.LastModifierDisplayName}} 7 | {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} 8 | 9 | {{end}} 10 |
    11 | 12 | {{ partial "footer.html" . }} 13 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | navigation 4 | 5 | 6 | 7 |

    Additional Lints

    8 |

    9 | Discover what Schemacrawler Additional Lints are all about and the core-concepts behind it. 10 |

    11 | 12 | 13 | {{ partial "footer.html" . }} 14 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/index.json: -------------------------------------------------------------------------------- 1 | [{{ range $index, $page := .Site.Pages }} 2 | {{- if ne $page.Type "json" -}} 3 | {{- if and $index (gt $index 0) -}},{{- end }} 4 | { 5 | "uri": "{{ $page.Permalink }}", 6 | "title": "{{ htmlEscape $page.Title}}", 7 | "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], 8 | "description": "{{ htmlEscape .Description}}", 9 | "content": {{$page.Plain | jsonify}} 10 | } 11 | {{- end -}} 12 | {{- end -}}] -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/custom-comments.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/custom-footer.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/custom-header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/favicon.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/logo.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/menu-footer.html: -------------------------------------------------------------------------------- 1 |

    Built with from Grav and Hugo

    2 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/meta.html: -------------------------------------------------------------------------------- 1 | 2 | {{ with .Site.Params.author }}{{ end }} 3 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/search.html: -------------------------------------------------------------------------------- 1 | 6 | {{ $assetBusting := not .Site.Params.disableAssetsBusting }} 7 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/tags.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.tags }} 2 |
    3 | {{range .Params.tags}} 4 | {{ . }} 5 | {{end}} 6 |
    7 | {{end}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{ .TableOfContents }} 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/attachments.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    3 | 7 | {{if eq .Page.File.BaseFileName "index"}} 8 | {{$.Scratch.Add "filesName" "files"}} 9 | {{else}} 10 | {{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}} 11 | {{end}} 12 |
    13 | {{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }} 14 | {{ $fileDir := replace $.Page.File.Dir "\\" "/" }} 15 | {{if ($.Get "pattern")}} 16 | {{if (findRE ($.Get "pattern") .Name)}} 17 |
  • 18 | 19 | {{.Name}} 20 | 21 | ({{div .Size 1024 }} {{T "BinaryPrefix-kilobyte"}}) 22 |
  • 23 | {{end}} 24 | {{else}} 25 |
  • 26 | 27 | {{.Name}} 28 | 29 | ({{div .Size 1024 }} {{T "BinaryPrefix-kilobyte"}}) 30 |
  • 31 | {{end}} 32 | {{end}} 33 |
    34 | {{.Inner}} 35 |
    36 | 37 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 3 | {{ $icon := .Get "icon" }} 4 | {{ $iconposition := .Get "icon-position" }} 5 | {{ if ($icon) }} 6 | {{ if or (not ($iconposition)) (eq $iconposition "left") }} 7 | 8 | {{ end }} 9 | {{ end }} 10 | {{ .Inner }} 11 | {{ if and ($icon) (eq $iconposition "right")}} 12 | 13 | {{ end }} 14 | 15 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/expand.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    3 |
    4 | 5 | 6 | {{$expandMessage := T "Expand-title"}} 7 | {{ if .IsNamedParams }} 8 | {{.Get "default" | default $expandMessage}} 9 | {{else}} 10 | {{.Get 0 | default $expandMessage}} 11 | {{end}} 12 | 13 |
    14 | 17 |
    -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    {{ safeHTML .Inner }}
    3 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/notice.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    {{ .Inner }}
    3 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/ref.html: -------------------------------------------------------------------------------- 1 | {{- if in (.Get 0) "/_index.md" -}} 2 | {{- $paths := (split (.Get 0) "_index.md") -}} 3 | {{- $pagepath := index $paths 0 -}} 4 | {{- $anchor := index $paths 1 -}} 5 | {{- with .Site.GetPage "section" (trim $pagepath "/") -}} 6 | {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} 7 | {{- end -}} 8 | {{- else -}} 9 | {{- with .Site.GetPage "section" (.Get 0) }} 10 | {{- .RelPermalink -}} 11 | {{- else -}} 12 | {{- .Get 0 | relref .Page -}} 13 | {{- end -}} 14 | {{- end -}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/relref.html: -------------------------------------------------------------------------------- 1 | {{- if in (.Get 0) "/_index.md" -}} 2 | {{- $paths := (split (.Get 0) "_index.md") -}} 3 | {{- $pagepath := index $paths 0 -}} 4 | {{- $anchor := index $paths 1 -}} 5 | {{- with .Site.GetPage "section" (trim $pagepath "/") -}} 6 | {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} 7 | {{- end -}} 8 | {{- else -}} 9 | {{- with .Site.GetPage "section" (.Get 0) }} 10 | {{- .RelPermalink -}} 11 | {{- else -}} 12 | {{- .Get 0 | relref .Page -}} 13 | {{- end -}} 14 | {{- end -}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/layouts/shortcodes/siteparam.html: -------------------------------------------------------------------------------- 1 | {{- $paramName := (.Get 0) -}} 2 | {{- $siteParams := .Site.Params -}} 3 | {{- with $paramName -}} 4 | {{- with $siteParams -}} 5 | {{- index . (lower $paramName) -}} 6 | {{- end -}} 7 | {{- end -}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "exampleSite/public" 3 | command = "hugo -s exampleSite" 4 | 5 | [build.environment] 6 | HUGO_THEME = "repo" 7 | HUGO_THEMESDIR = "/opt/build" 8 | HUGO_VERSION = "0.72.0" 9 | 10 | [context.production.environment] 11 | HUGO_BASEURL = "https://learn.netlify.app/" 12 | 13 | [context.deploy-preview] 14 | command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" 15 | 16 | [context.deploy-preview.environment] 17 | HUGO_ENABLEGITINFO = "true" 18 | 19 | [context.branch-deplpy] 20 | command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" 21 | 22 | [context.branch-deploy.environment] 23 | HUGO_ENABLEGITINFO = "true" 24 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/css/atom-one-dark-reasonable.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage 4 | 5 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 6 | 7 | */ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | line-height: 1.3em; 13 | color: #abb2bf; 14 | background: #282c34; 15 | border-radius: 5px; 16 | } 17 | .hljs-keyword, .hljs-operator { 18 | color: #F92672; 19 | } 20 | .hljs-pattern-match { 21 | color: #F92672; 22 | } 23 | .hljs-pattern-match .hljs-constructor { 24 | color: #61aeee; 25 | } 26 | .hljs-function { 27 | color: #61aeee; 28 | } 29 | .hljs-function .hljs-params { 30 | color: #A6E22E; 31 | } 32 | .hljs-function .hljs-params .hljs-typing { 33 | color: #FD971F; 34 | } 35 | .hljs-module-access .hljs-module { 36 | color: #7e57c2; 37 | } 38 | .hljs-constructor { 39 | color: #e2b93d; 40 | } 41 | .hljs-constructor .hljs-string { 42 | color: #9CCC65; 43 | } 44 | .hljs-comment, .hljs-quote { 45 | color: #b18eb1; 46 | font-style: italic; 47 | } 48 | .hljs-doctag, .hljs-formula { 49 | color: #c678dd; 50 | } 51 | .hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { 52 | color: #e06c75; 53 | } 54 | .hljs-literal { 55 | color: #56b6c2; 56 | } 57 | .hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | .hljs-built_in, .hljs-class .hljs-title { 61 | color: #e6c07b; 62 | } 63 | .hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { 64 | color: #d19a66; 65 | } 66 | .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { 67 | color: #61aeee; 68 | } 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | .hljs-link { 76 | text-decoration: underline; 77 | } 78 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/css/auto-complete.css: -------------------------------------------------------------------------------- 1 | .autocomplete-suggestions { 2 | text-align: left; 3 | cursor: default; 4 | border: 1px solid #ccc; 5 | border-top: 0; 6 | background: #fff; 7 | box-shadow: -1px 1px 3px rgba(0,0,0,.1); 8 | 9 | /* core styles should not be changed */ 10 | position: absolute; 11 | display: none; 12 | z-index: 9999; 13 | max-height: 254px; 14 | overflow: hidden; 15 | overflow-y: auto; 16 | box-sizing: border-box; 17 | 18 | } 19 | .autocomplete-suggestion { 20 | position: relative; 21 | cursor: pointer; 22 | padding: 7px; 23 | line-height: 23px; 24 | white-space: nowrap; 25 | overflow: hidden; 26 | text-overflow: ellipsis; 27 | color: #333; 28 | } 29 | 30 | .autocomplete-suggestion b { 31 | font-weight: normal; 32 | color: #1f8dd6; 33 | } 34 | 35 | .autocomplete-suggestion.selected { 36 | background: #333; 37 | color: #fff; 38 | } 39 | 40 | .autocomplete-suggestion:hover { 41 | background: #444; 42 | color: #fff; 43 | } 44 | 45 | .autocomplete-suggestion > .context { 46 | font-size: 12px; 47 | } 48 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/css/featherlight.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Featherlight - ultra slim jQuery lightbox 3 | * Version 1.7.13 - http://noelboss.github.io/featherlight/ 4 | * 5 | * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com) 6 | * MIT Licensed. 7 | **/ 8 | html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}} -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/css/hybrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) 4 | 5 | */ 6 | 7 | /*background color*/ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #1d1f21; 13 | } 14 | 15 | /*selection color*/ 16 | .hljs::selection, 17 | .hljs span::selection { 18 | background: #373b41; 19 | } 20 | 21 | .hljs::-moz-selection, 22 | .hljs span::-moz-selection { 23 | background: #373b41; 24 | } 25 | 26 | /*foreground color*/ 27 | .hljs { 28 | color: #c5c8c6; 29 | } 30 | 31 | /*color: fg_yellow*/ 32 | .hljs-title, 33 | .hljs-name { 34 | color: #f0c674; 35 | } 36 | 37 | /*color: fg_comment*/ 38 | .hljs-comment, 39 | .hljs-meta, 40 | .hljs-meta .hljs-keyword { 41 | color: #707880; 42 | } 43 | 44 | /*color: fg_red*/ 45 | .hljs-number, 46 | .hljs-symbol, 47 | .hljs-literal, 48 | .hljs-deletion, 49 | .hljs-link { 50 | color: #cc6666 51 | } 52 | 53 | /*color: fg_green*/ 54 | .hljs-string, 55 | .hljs-doctag, 56 | .hljs-addition, 57 | .hljs-regexp, 58 | .hljs-selector-attr, 59 | .hljs-selector-pseudo { 60 | color: #b5bd68; 61 | } 62 | 63 | /*color: fg_purple*/ 64 | .hljs-attribute, 65 | .hljs-code, 66 | .hljs-selector-id { 67 | color: #b294bb; 68 | } 69 | 70 | /*color: fg_blue*/ 71 | .hljs-keyword, 72 | .hljs-selector-tag, 73 | .hljs-bullet, 74 | .hljs-tag { 75 | color: #81a2be; 76 | } 77 | 78 | /*color: fg_aqua*/ 79 | .hljs-subst, 80 | .hljs-variable, 81 | .hljs-template-tag, 82 | .hljs-template-variable { 83 | color: #8abeb7; 84 | } 85 | 86 | /*color: fg_orange*/ 87 | .hljs-type, 88 | .hljs-built_in, 89 | .hljs-builtin-name, 90 | .hljs-quote, 91 | .hljs-section, 92 | .hljs-selector-class { 93 | color: #de935f; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/css/tags.css: -------------------------------------------------------------------------------- 1 | /* Tags */ 2 | 3 | #head-tags{ 4 | margin-left:1em; 5 | margin-top:1em; 6 | } 7 | 8 | #body .tags a.tag-link { 9 | display: inline-block; 10 | line-height: 2em; 11 | font-size: 0.8em; 12 | position: relative; 13 | margin: 0 16px 8px 0; 14 | padding: 0 10px 0 12px; 15 | background: #8451a1; 16 | 17 | -webkit-border-bottom-right-radius: 3px; 18 | border-bottom-right-radius: 3px; 19 | -webkit-border-top-right-radius: 3px; 20 | border-top-right-radius: 3px; 21 | 22 | -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); 23 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 24 | color: #fff; 25 | } 26 | 27 | #body .tags a.tag-link:before { 28 | content: ""; 29 | position: absolute; 30 | top:0; 31 | left: -1em; 32 | width: 0; 33 | height: 0; 34 | border-color: transparent #8451a1 transparent transparent; 35 | border-style: solid; 36 | border-width: 1em 1em 1em 0; 37 | } 38 | 39 | #body .tags a.tag-link:after { 40 | content: ""; 41 | position: absolute; 42 | top: 10px; 43 | left: 1px; 44 | width: 5px; 45 | height: 5px; 46 | -webkit-border-radius: 50%; 47 | border-radius: 100%; 48 | background: #fff; 49 | } 50 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Inconsolata.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/images/clippy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/images/favicon.png -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/images/gopher-404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/images/gopher-404.jpg -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbarre/schemacrawler-additional-lints/b9649c138eeba4e8c0815ffacc154815c589c260/src/site/themes/hugo-theme-learn/static/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/spf13/hugoThemes#themetoml for an example 3 | 4 | name = "Learn" 5 | license = "MIT" 6 | licenselink = "https://github.com/matcornic/hugo-theme-learn/blob/master/LICENSE.md" 7 | description = "Documentation theme for Hugo, based on Grav Learn theme" 8 | homepage = "https://github.com/matcornic/hugo-theme-learn/" 9 | repo = "https://github.com/matcornic/hugo-theme-learn" 10 | tags = ["documentation", "grav", "learn", "doc", "search"] 11 | features = ["documentation", "menu", "nested sections", "search", "mermaid"] 12 | min_version = 0.25 13 | 14 | [author] 15 | name = "Mathieu Cornic" 16 | homepage = "https://matcornic.github.io/" 17 | 18 | [original] 19 | name = "Grav Learn" 20 | homepage = "https://learn.getgrav.org/" 21 | repo = "https://github.com/getgrav/grav-learn" 22 | -------------------------------------------------------------------------------- /src/site/themes/hugo-theme-learn/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | build: 3 | steps: 4 | # Gets the dependencies 5 | - script: 6 | name: get hugo 7 | code: | 8 | git clone https://github.com/gohugoio/hugo.git && cd hugo && go install 9 | # Sets the go workspace and places you package 10 | # at the right place in the workspace tree 11 | - setup-go-workspace 12 | # Build the project 13 | - script: 14 | name: build site 15 | code: | 16 | cd exampleSite && hugo -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterBlobTypeColumn/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | CREATE TABLE public.test_blob( 31 | id integer NOT NULL, 32 | content_blob bytea NULL, 33 | content_ varchar(30) NULL) 34 | 35 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterColumnContentNotNormalized/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterColumnSize/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterCompressBlob/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | CREATE TABLE test_compress_blob( 31 | id integer NOT NULL, 32 | content_blob bytea NULL) 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterForbiddenPrimaryKeyType/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 39 | 40 | insert into test_pk_char(id, content) values (current_date, 'test char(10) pk') 41 | 42 | 43 | 44 | 45 | 46 | 47 | 51 | 52 | insert into test_pk_singlechar(id, content) values (current_datetime, 'test char(1) pk') 53 | insert into test_pk_singlechar(id, content) values (current_datetime, 'test char(1) pk') 54 | 55 | 56 | 57 | 58 | 59 | 60 | 64 | 65 | insert into test_pk_timestamp(id, content) values (current_timestamp, 'test timestamp pk') 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterJsonContent/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterJsonTypeColumn/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterNoSpaceInNames/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterOrphanTable/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterPluralTableName/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterTableNameNotInLowerCase/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 38 | 39 | insert into "TEST_CASE"(id, "UPPERCASE_COLUMN_NAME", lowercase_column_name) values (1, 'AAAA', 'aaaaa') 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterTimeStampWithOutTimeZoneColumn/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 42 | insert into test_timetsamp_type(id, content, created_at,updated_at) values (1, 'timestamp_lint', current_timestamp,current_timestamp::timestamptz) 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/test/db/liquibase/LinterXmlContent/db.changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | data')]]> 42 | data2', 'data2')]]> 43 | data')]]> 44 | data')]]> 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/db/liquibase/dba/sql/init_db_test.sql: -------------------------------------------------------------------------------- 1 | --- 2 | -- #%L 3 | -- Additional SchemaCrawler Lints 4 | -- %% 5 | -- Copyright (C) 2015 - 2016 github 6 | -- %% 7 | -- This program is free software: you can redistribute it and/or modify 8 | -- it under the terms of the GNU General Public License as 9 | -- published by the Free Software Foundation, either version 3 of the 10 | -- License, or (at your option) any later version. 11 | -- 12 | -- This program is distributed in the hope that it will be useful, 13 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | -- GNU General Public License for more details. 16 | -- 17 | -- You should have received a copy of the GNU General Public 18 | -- License along with this program. If not, see 19 | -- . 20 | -- #L% 21 | --- 22 | create database sc_lint_test owner postgres; 23 | -------------------------------------------------------------------------------- /src/test/java/TestLintPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * Additional SchemaCrawler Lints 4 | * %% 5 | * Copyright (C) 2015 - 2016 github 6 | * %% 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public 18 | * License along with this program. If not, see 19 | * . 20 | * #L% 21 | */ 22 | 23 | import org.junit.Test; 24 | import schemacrawler.tools.lint.LinterRegistry; 25 | 26 | import static org.junit.Assert.assertTrue; 27 | 28 | public class TestLintPlugin 29 | { 30 | 31 | @Test 32 | public void testLintPlugin() throws Exception 33 | { 34 | final LinterRegistry registry = new LinterRegistry(); 35 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterTableNameNotInLowerCase")); 36 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterColumnContentNotNormalized")); 37 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterJsonTypeColumn")); 38 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterJsonContent")); 39 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterXmlContent")); 40 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterBooleanContent")); 41 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterPrimaryKeyNotIntegerLikeType")); 42 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterBlobTypeColumn")); 43 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterColumnSize")); 44 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterByteaTypeColumn")); 45 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterPluralTableName")); 46 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterLeftSpacePadding")); 47 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterRightSpacePadding")); 48 | assertTrue(registry.hasLinter("io.github.mbarre.schemacrawler.tool.linter.LinterTimeStampWithOutTimeZoneColumn")); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/test/utils/LintWrapper.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.test.utils; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | /** 26 | * Created by barmi83 on 24/12/15. 27 | */ 28 | public class LintWrapper { 29 | 30 | private String id; 31 | private String value; 32 | private String description; 33 | private String severity; 34 | private String tableName; 35 | 36 | public LintWrapper(){ 37 | super(); 38 | } 39 | 40 | public LintWrapper(String id, String value, String description, String severity, String tableName) { 41 | this.id = id; 42 | this.value = value; 43 | this.description = description; 44 | this.severity = severity; 45 | this.tableName = tableName; 46 | } 47 | 48 | public String getId() { 49 | return id; 50 | } 51 | 52 | public void setId(String id) { 53 | this.id = id; 54 | } 55 | 56 | public String getValue() { 57 | return value; 58 | } 59 | 60 | public void setValue(String value) { 61 | this.value = value; 62 | } 63 | 64 | public String getDescription() { 65 | return description; 66 | } 67 | 68 | public void setDescription(String description) { 69 | this.description = description; 70 | } 71 | 72 | public String getSeverity() { 73 | return severity; 74 | } 75 | 76 | public void setSeverity(String severity) { 77 | this.severity = severity; 78 | } 79 | 80 | public String getTableName() { 81 | return tableName; 82 | } 83 | 84 | public void setTableName(String tableName) { 85 | this.tableName = tableName; 86 | } 87 | 88 | @Override 89 | public String toString() { 90 | return "LintWrapper[id="+id+", value="+value+", description="+description+", severity="+severity+", table="+tableName+"]"; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/tool/linter/LinterCompressBlobTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.sql.DriverManager; 27 | import java.util.List; 28 | import java.util.Objects; 29 | 30 | import org.junit.Assert; 31 | import org.junit.BeforeClass; 32 | import org.junit.Test; 33 | import io.github.mbarre.schemacrawler.test.utils.LintWrapper; 34 | import io.github.mbarre.schemacrawler.test.utils.PostgreSqlDatabase; 35 | import schemacrawler.schemacrawler.SchemaCrawlerOptions; 36 | import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder; 37 | import schemacrawler.schemacrawler.SchemaInfoLevelBuilder; 38 | import schemacrawler.tools.lint.LinterRegistry; 39 | 40 | 41 | /** 42 | * Check columns with boolean content but numeric type 43 | * @author mbarre 44 | * @since 1.0.1 45 | */ 46 | public class LinterCompressBlobTest extends BaseLintTest { 47 | 48 | private static final String CHANGE_LOG_COMPRESS_BLOB_CHECK = "src/test/db/liquibase/LinterCompressBlob/db.changelog.xml"; 49 | private static PostgreSqlDatabase database; 50 | 51 | @BeforeClass 52 | public static void init(){ 53 | database = new PostgreSqlDatabase(); 54 | database.setUp(CHANGE_LOG_COMPRESS_BLOB_CHECK); 55 | } 56 | 57 | @Test 58 | public void testLint_blob() throws Exception{ 59 | 60 | final LinterRegistry registry = new LinterRegistry(); 61 | Assert.assertTrue(registry.hasLinter(LinterBooleanContent.class.getName())); 62 | 63 | final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions(); 64 | 65 | Connection connection = DriverManager.getConnection(database.getConnectionString(), 66 | PostgreSqlDatabase.USER_NAME, database.getPostgresPassword()); 67 | 68 | List lints = executeToJsonAndConvertToLintList(LinterCompressBlob.class.getSimpleName(), options, connection); 69 | Assert.assertNotNull(lints); 70 | Assert.assertTrue(lints.stream().anyMatch(lint -> Objects.equals(lint.getDescription(), "Blob should be compressed"))); 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/tool/linter/LinterOrphanTableTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.sql.DriverManager; 27 | import java.util.List; 28 | 29 | import org.junit.Assert; 30 | import org.junit.BeforeClass; 31 | import org.junit.Test; 32 | import io.github.mbarre.schemacrawler.test.utils.LintWrapper; 33 | import io.github.mbarre.schemacrawler.test.utils.PostgreSqlDatabase; 34 | import schemacrawler.schemacrawler.SchemaCrawlerOptions; 35 | import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder; 36 | import schemacrawler.schemacrawler.SchemaInfoLevelBuilder; 37 | import schemacrawler.tools.lint.LinterRegistry; 38 | 39 | /** 40 | * @author mbarre 41 | */ 42 | public class LinterOrphanTableTest extends BaseLintTest { 43 | 44 | private static final String CHANGE_LOG_ORPHANTABLE_CHECK = "src/test/db/liquibase/LinterOrphanTable/db.changelog.xml"; 45 | private static PostgreSqlDatabase database; 46 | 47 | @BeforeClass 48 | public static void init(){ 49 | database = new PostgreSqlDatabase(); 50 | database.setUp(CHANGE_LOG_ORPHANTABLE_CHECK); 51 | } 52 | 53 | @Test 54 | public void testLint() throws Exception{ 55 | 56 | final LinterRegistry registry = new LinterRegistry(); 57 | Assert.assertTrue(registry.hasLinter(LinterTableNameNotInLowerCase.class.getName())); 58 | 59 | final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions(); 60 | 61 | Connection connection = DriverManager.getConnection(database.getConnectionString(), 62 | PostgreSqlDatabase.USER_NAME, database.getPostgresPassword()); 63 | 64 | List lints = executeToJsonAndConvertToLintList(LinterOrphanTable.class.getSimpleName(), options, connection); 65 | 66 | Assert.assertEquals(1,lints.size()); 67 | Assert.assertEquals(LinterOrphanTable.class.getName(), lints.get(0).getId()); 68 | Assert.assertEquals("table3", lints.get(0).getValue()); 69 | Assert.assertEquals("table has no relation with any other table.", lints.get(0).getDescription()); 70 | Assert.assertEquals("high", lints.get(0).getSeverity()); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/tool/linter/LinterPluralTableNameTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.sql.DriverManager; 27 | import java.util.List; 28 | 29 | import org.junit.Assert; 30 | import org.junit.BeforeClass; 31 | import org.junit.Test; 32 | import io.github.mbarre.schemacrawler.test.utils.LintWrapper; 33 | import io.github.mbarre.schemacrawler.test.utils.PostgreSqlDatabase; 34 | import schemacrawler.schemacrawler.SchemaCrawlerOptions; 35 | import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder; 36 | import schemacrawler.schemacrawler.SchemaInfoLevelBuilder; 37 | import schemacrawler.tools.lint.LinterRegistry; 38 | 39 | 40 | /** 41 | * Check table name not plural 42 | * @author mbarre 43 | */ 44 | public class LinterPluralTableNameTest extends BaseLintTest { 45 | 46 | private static final String CHANGE_LOG_TABLENAME_CHECK = "src/test/db/liquibase/LinterPluralTableName/db.changelog.xml"; 47 | private static PostgreSqlDatabase database; 48 | 49 | @BeforeClass 50 | public static void init(){ 51 | database = new PostgreSqlDatabase(); 52 | database.setUp(CHANGE_LOG_TABLENAME_CHECK); 53 | } 54 | 55 | @Test 56 | public void testLint() throws Exception{ 57 | 58 | final LinterRegistry registry = new LinterRegistry(); 59 | Assert.assertTrue(registry.hasLinter(LinterPluralTableName.class.getName())); 60 | 61 | final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions(); 62 | 63 | Connection connection = DriverManager.getConnection(database.getConnectionString(), 64 | PostgreSqlDatabase.USER_NAME, database.getPostgresPassword()); 65 | 66 | List lints = executeToJsonAndConvertToLintList(LinterPluralTableName.class.getSimpleName(), options, connection); 67 | Assert.assertEquals(1,lints.size()); 68 | int index = 0; 69 | Assert.assertEquals(LinterPluralTableName.class.getName(), lints.get(index).getId()); 70 | Assert.assertEquals("customers", lints.get(index).getValue()); 71 | Assert.assertEquals("Don't use plural for table name.", lints.get(index).getDescription()); 72 | Assert.assertEquals("medium", lints.get(index).getSeverity()); 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/tool/linter/LinterTimeStampWithOutTimeZoneColumnTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.tool.linter; 2 | 3 | /*- 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2019 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | import java.sql.Connection; 26 | import java.sql.DriverManager; 27 | import java.util.List; 28 | 29 | import org.junit.Assert; 30 | import org.junit.BeforeClass; 31 | import org.junit.Test; 32 | 33 | import io.github.mbarre.schemacrawler.test.utils.LintWrapper; 34 | import io.github.mbarre.schemacrawler.test.utils.PostgreSqlDatabase; 35 | import schemacrawler.schemacrawler.SchemaCrawlerOptions; 36 | import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder; 37 | import schemacrawler.schemacrawler.SchemaInfoLevelBuilder; 38 | import schemacrawler.tools.lint.LinterRegistry; 39 | 40 | public class LinterTimeStampWithOutTimeZoneColumnTest extends BaseLintTest { 41 | 42 | private static final String CHANGE_LOG_TIMESTAMP_CHECK = "src/test/db/liquibase/LinterTimeStampWithOutTimeZoneColumn/db.changelog.xml"; 43 | private static PostgreSqlDatabase database; 44 | 45 | @BeforeClass 46 | public static void init(){ 47 | database = new PostgreSqlDatabase(); 48 | database.setUp(CHANGE_LOG_TIMESTAMP_CHECK); 49 | } 50 | 51 | @Test 52 | public void testLint() throws Exception{ 53 | 54 | final LinterRegistry registry = new LinterRegistry(); 55 | Assert.assertTrue(registry.hasLinter(LinterTimeStampWithOutTimeZoneColumn.class.getName())); 56 | 57 | final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.newSchemaCrawlerOptions(); 58 | 59 | Connection connection = DriverManager.getConnection(database.getConnectionString(), 60 | PostgreSqlDatabase.USER_NAME, database.getPostgresPassword()); 61 | 62 | List lints = executeToJsonAndConvertToLintList(LinterTimeStampWithOutTimeZoneColumn.class.getSimpleName(), options, connection); 63 | Assert.assertEquals(1,lints.size()); 64 | int index = 0; 65 | Assert.assertEquals(LinterTimeStampWithOutTimeZoneColumn.class.getName(), lints.get(index).getId()); 66 | Assert.assertEquals("public.test_timetsamp_type.created_at", lints.get(index).getValue()); 67 | Assert.assertEquals("Timestamp without time zone (timestamp) is not a permitted data type. Use timestamp with time zone (timestamptz)", lints.get(index).getDescription()); 68 | Assert.assertEquals("critical", lints.get(index).getSeverity()); 69 | 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/utils/JSonUtilsTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.utils; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | 26 | import org.junit.Assert; 27 | import org.junit.Test; 28 | 29 | /** 30 | * @author barmi83 31 | * @since 32 | */ 33 | public class JSonUtilsTest { 34 | 35 | public JSonUtilsTest(){ 36 | Assert.assertTrue(true); 37 | } 38 | @Test 39 | public void testUtils_success() { 40 | 41 | String data = "{\"menu\": {\"id\": \"file\", \"value\": \"File\", \"popup\": {\"menuitem\": [{\"value\": \"New\", " 42 | + "\"onclick\": \"CreateNewDoc()\"},{\"value\": \"Open\", \"onclick\": \"OpenDoc()\"}," 43 | + " {\"value\": \"Close\", \"onclick\": \"CloseDoc()\"}]}}}"; 44 | 45 | Assert.assertTrue(JSonUtils.isJsonContent(data)); 46 | 47 | } 48 | 49 | @Test 50 | public void testUtils_fails() { 51 | 52 | String data = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." 53 | + " Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " 54 | + "dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " 55 | + "proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; 56 | 57 | Assert.assertFalse(JSonUtils.isJsonContent(data)); 58 | 59 | Assert.assertFalse(JSonUtils.isJsonContent(null)); 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/test/java/io/github/mbarre/schemacrawler/utils/XmlUtilsTest.java: -------------------------------------------------------------------------------- 1 | package io.github.mbarre.schemacrawler.utils; 2 | 3 | /* 4 | * #%L 5 | * Additional SchemaCrawler Lints 6 | * %% 7 | * Copyright (C) 2015 - 2016 github 8 | * %% 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public 20 | * License along with this program. If not, see 21 | * . 22 | * #L% 23 | */ 24 | 25 | 26 | import org.junit.Assert; 27 | import org.junit.Test; 28 | 29 | /** 30 | * @author barmi83 31 | * @since 32 | */ 33 | public class XmlUtilsTest { 34 | 35 | 36 | public XmlUtilsTest(){ 37 | Assert.assertTrue(true); 38 | } 39 | @Test 40 | public void testUtils_success() { 41 | 42 | String data = "ToveJaniReminderDon't forget me this weekend!"; 43 | 44 | Assert.assertTrue(XmlUtils.isXmlContent(data)); 45 | 46 | } 47 | 48 | /** 49 | * Tests wether even a malformed (ie. missing prolog) xml document is 50 | * detected as xml 51 | * 52 | */ 53 | @Test 54 | public void testXmlEvenWithMissingProlog() { 55 | String data = "ToveJaniReminderDon't forget me this weekend!"; 56 | Assert.assertTrue(XmlUtils.isXmlContent(data)); 57 | } 58 | 59 | @Test 60 | public void testUtils_fails() { 61 | 62 | String data = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." 63 | + " Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " 64 | + "dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non " 65 | + "proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; 66 | 67 | Assert.assertFalse(XmlUtils.isXmlContent(data)); 68 | 69 | Assert.assertFalse(XmlUtils.isXmlContent(null)); 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/test/resources/test.properties: -------------------------------------------------------------------------------- 1 | ### 2 | # #%L 3 | # Additional SchemaCrawler Lints 4 | # %% 5 | # Copyright (C) 2015 - 2016 github 6 | # %% 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public 18 | # License along with this program. If not, see 19 | # . 20 | # #L% 21 | ### 22 | # Default postgres user password, replace with your own for testing 23 | # Uncomment acccording to your needs 24 | postgres.password= 25 | postgres.port= 26 | --------------------------------------------------------------------------------