{"id":30039679,"url":"https://github.com/manticore-projects/jsqlformatter","last_synced_at":"2025-08-26T20:08:47.207Z","repository":{"id":39855364,"uuid":"356118859","full_name":"manticore-projects/jsqlformatter","owner":"manticore-projects","description":"Java SQL Formatter, Beautifier and Pretty Printer","archived":false,"fork":false,"pushed_at":"2025-08-05T07:19:38.000Z","size":6242,"stargazers_count":34,"open_issues_count":7,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T01:48:53.409Z","etag":null,"topics":["beautify","formatter","java","mssql","mysql","oracle","postgres","pretty-print","sql"],"latest_commit_sha":null,"homepage":"https://manticore-projects.com/JSQLFormatter/index.html","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manticore-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-09T03:10:31.000Z","updated_at":"2025-08-06T02:32:52.000Z","dependencies_parsed_at":"2024-03-21T04:30:40.551Z","dependency_job_id":"5f536338-e347-42cb-aad1-b31a08864b50","html_url":"https://github.com/manticore-projects/jsqlformatter","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/manticore-projects/jsqlformatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticore-projects%2Fjsqlformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticore-projects%2Fjsqlformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticore-projects%2Fjsqlformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticore-projects%2Fjsqlformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manticore-projects","download_url":"https://codeload.github.com/manticore-projects/jsqlformatter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticore-projects%2Fjsqlformatter/sbom","scorecard":{"id":615673,"data":{"date":"2025-08-11","repo":{"name":"github.com/manticore-projects/jsqlformatter","commit":"902a27abc4034840ba69918662d7a3ad1d1ff823"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: topLevel permissions set to 'write-all': .github/workflows/gradle.yml:12"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gradle.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gradle.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/manticore-projects/jsqlformatter/gradle.yml/main?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.1.11 not signed: https://api.github.com/repos/manticore-projects/jsqlformatter/releases/61080355","Warn: release artifact 0.1.11 does not have provenance: https://api.github.com/repos/manticore-projects/jsqlformatter/releases/61080355"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/gradle.yml:31"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T03:51:56.603Z","repository_id":39855364,"created_at":"2025-08-21T03:51:56.603Z","updated_at":"2025-08-21T03:51:56.603Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272252485,"owners_count":24900666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautify","formatter","java","mssql","mysql","oracle","postgres","pretty-print","sql"],"created_at":"2025-08-07T01:48:48.693Z","updated_at":"2025-08-26T20:08:47.160Z","avatar_url":"https://github.com/manticore-projects.png","language":"PLpgSQL","readme":"# manticore JSQLFormatter\nJava SQL Formatter, Beautifier and Pretty Printer. Please visit our [Website](http://manticore-projects.com/JSQLFormatter/index.html) and try the [ONLINE Demo](http://jsqlformatter.manticore-projects.com).\n\n[![Gradle CI](https://github.com/manticore-projects/jsqlformatter/actions/workflows/gradle.yml/badge.svg)](https://github.com/manticore-projects/jsqlformatter/actions/workflows/gradle.yml)\n[![Maven](https://badgen.net/maven/v/maven-central/com.manticore-projects.jsqlformatter/jsqlformatter)](https://mvnrepository.com/artifact/com.manticore-projects.jsqlformatter/jsqlformatter)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/80374649d914462ebd6e5b160a1ebdbb)](https://app.codacy.com/gh/manticore-projects/jsqlformatter/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Coverage Status](https://coveralls.io/repos/github/manticore-projects/jsqlformatter/badge.svg)](https://coveralls.io/github/manticore-projects/jsqlformatter)\n[![License](https://img.shields.io/badge/License-AGPL-blue)](#LICENSE)\n[![issues - JSQLFormatter](https://img.shields.io/github/issues/manticore-projects/jsqlformatter)](https://github.com/manticore-projects/jsqlformatter/issues)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n![ANSI Output](./src/site/sphinx/_static/ansi-terminal.png)\n\n## Features\n* Based on [JSQLParser](https://github.com/JSQLParser/JSqlParser)\n* Supports complex SELECT, INSERT INTO, MERGE, UPDATE, DELETE, CREATE, ALTER statements\n* RDBMS agnostic and compatible to\n* ANSI syntax highlighting\n* Formatting Options for Indent Width, Comma Before or After, Upper/Lower/Camel Case spelling\n* Import from Java String or StringBuilder, while preserving variables\n* Export to Java String, StringBuilder or MessageFormat, while handling parameters\n* Command Line Option (CLI) and SQL Inline Options\n\n    ```shell\n    java -jar JSQLFormatter.jar [-i \u003carg\u003e] [-o \u003carg\u003e] [-f \u003carg\u003e |\n           --ansi | --html]   [-t \u003carg\u003e | -2 | -8]   [--keywordSpelling \u003carg\u003e]\n           [--functionSpelling \u003carg\u003e] [--objectSpelling \u003carg\u003e] [--separation\n           \u003carg\u003e] [--squareBracketQuotation \u003carg\u003e]\n\n     -i,--inputFile \u003carg\u003e               The input SQL file or folder.\n     -o,--outputFile \u003carg\u003e              The out SQL file for the formatted\n                        statements.\n     -f,--outputFormat \u003carg\u003e            The output-format.\n                        [PLAIN* ANSI HTML RTF]\n        --ansi                          Output ANSI annotated text.\n        --html                          Output HTML annotated text.\n     -t,--indent \u003carg\u003e                  The indent width.\n                        [2 4* 8]\n     -2                                 Indent with 2 characters.\n     -8                                 Indent with 8 characters.\n        --keywordSpelling \u003carg\u003e         Keyword spelling.\n                        [UPPER*, LOWER, CAMEL, KEEP]\n        --functionSpelling \u003carg\u003e        Function name spelling.\n                        [UPPER, LOWER, CAMEL*, KEEP]\n        --objectSpelling \u003carg\u003e          Object name spelling.\n                        [UPPER, LOWER*, CAMEL, KEEP]\n        --separation \u003carg\u003e              Position of the field separator.\n                        [BEFORE*, AFTER]\n        --squareBracketQuotation \u003carg\u003e  Position of the field separator.\n                        [AUTO*, YES, NO]\n    ```\n\n\n* simple usage of the Java library\n\n    ```java\n    import com.manticore.jsqlformatter.JSQLFormatter;\n    ...\n    String formattedSql = JSQLFormatter.format(\"SELECT * FROM table1\")\n    ```\n\n    with Maven Artifact:\n\n    ```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.manticore-projects.jsqlformatter\u003c/groupId\u003e\n        \u003cartifactId\u003ejsqlformatter\u003c/artifactId\u003e\n        \u003cversion\u003e4.8.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n\n## Samples\n\n### Inline Formatting Options\n```sql\n-- @JSQLFormatter(indentWidth=8, keywordSpelling=UPPER, functionSpelling=CAMEL, objectSpelling=LOWER, separation=BEFORE)\nUPDATE cfe.calendar\nSET     year_offset = ?                    /* year offset */\n        , settlement_shift = To_Char( ? )  /* settlement shift */\n        , friday_is_holiday = ?            /* friday is a holiday */\n        , saturday_is_holiday = ?          /* saturday is a holiday */\n        , sunday_is_holiday = ?            /* sunday is a holiday */\nWHERE id_calendar = ?\n;\n\n-- @JSQLFormatter(indentWidth=2, keywordSpelling=LOWER, functionSpelling=KEEP, objectSpelling=UPPER, separation=AFTER)\nupdate CFE.CALENDAR\nset YEAR_OFFSET = ?                    /* year offset */,\n    SETTLEMENT_SHIFT = to_char( ? )    /* settlement shift */,\n    FRIDAY_IS_HOLIDAY = ?              /* friday is a holiday */,\n    SATURDAY_IS_HOLIDAY = ?            /* saturday is a holiday */,\n    SUNDAY_IS_HOLIDAY = ?              /* sunday is a holiday */\nwhere ID_CALENDAR = ?\n;\n```\n\n### Complex Comments\n```sql\n-- UPDATE CALENDAR\nUPDATE cfe.calendar\nSET year_offset = ?            /* year offset */\n    , settlement_shift = ?     /* settlement shift */\n    , friday_is_holiday = ?    /* friday is a holiday */\n    , saturday_is_holiday = ?  /* saturday is a holiday */\n    , sunday_is_holiday = ?    /* sunday is a holiday */\nWHERE id_calendar = ?\n;\n\n-- BOTH CLAUSES PRESENT 'with a string' AND \"a field\"\nMERGE /*+ PARALLEL */ INTO test1 /*the target table*/ a\n    USING all_objects      /*the source table*/\n        ON ( /*joins in()!*/ a.object_id = b.object_id )\n-- INSERT CLAUSE\nWHEN /*comments between keywords!*/ NOT MATCHED THEN\n    INSERT ( object_id     /*ID Column*/\n                , status   /*Status Column*/ )\n    VALUES ( b.object_id\n                , b.status )\n/* UPDATE CLAUSE\nWITH A WHERE CONDITION */\nWHEN MATCHED THEN          /* Lets rock */\n    UPDATE SET  a.status = '/*this is no comment!*/ and -- this ain''t either'\n    WHERE   b.\"--status\" != 'VALID'\n;\n```\n\n[More Samples](http://manticore-projects.com/JSQLFormatter/samples.html)\n","funding_links":[],"categories":["SQL"],"sub_categories":["Formatters"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticore-projects%2Fjsqlformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanticore-projects%2Fjsqlformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticore-projects%2Fjsqlformatter/lists"}