{"id":21639141,"url":"https://github.com/andeemarks/checkstyle-edn-listener","last_synced_at":"2026-05-20T10:45:30.631Z","repository":{"id":136803966,"uuid":"107337863","full_name":"andeemarks/checkstyle-edn-listener","owner":"andeemarks","description":"A basic Checkstyle AuditListener implementation to output checkstyle results in EDN (https://github.com/edn-format/edn)","archived":false,"fork":false,"pushed_at":"2017-10-20T11:30:29.000Z","size":4859,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T02:09:18.000Z","etag":null,"topics":["auditlistener","checkstyle","clojure","edn"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andeemarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-10-18T00:14:28.000Z","updated_at":"2017-10-18T00:17:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"e683d116-16e0-41bc-8b2e-db4bdc27e2d8","html_url":"https://github.com/andeemarks/checkstyle-edn-listener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andeemarks/checkstyle-edn-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeemarks%2Fcheckstyle-edn-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeemarks%2Fcheckstyle-edn-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeemarks%2Fcheckstyle-edn-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeemarks%2Fcheckstyle-edn-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andeemarks","download_url":"https://codeload.github.com/andeemarks/checkstyle-edn-listener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeemarks%2Fcheckstyle-edn-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33255861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["auditlistener","checkstyle","clojure","edn"],"created_at":"2024-11-25T04:12:55.685Z","updated_at":"2026-05-20T10:45:30.607Z","avatar_url":"https://github.com/andeemarks.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# checkstyle-edn-listener\nA basic Checkstyle [AuditListener](http://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/api/AuditListener.html) implementation \nto output checkstyle results in [EDN](https://github.com/edn-format/edn).  \n\nEDN (Extensible Data Notation) is a superset of the format of the Clojure language.\n\nThis code was written to provide EDN formatted Checkstyle output to feed into another project\nof mine: [aeolian](https://github.com/andeemarks/aeolian) which consumes Checkstyle data.\n\nThere are two main classes you can use:\n\n1. [EdnListener](src/org/corvine/checkstyle/EdnListener.java) - produces a single EDN map for each checkstyle error observed.\n1. [BatchingEdnListener](src/org/corvine/checkstyle/BatchingEdnListener.java) - produces a single EDN map for each set of errors for the same source file and line number.\n\n```EdnListener``` was my first take on this functionality before I realised I needed to \ncollapse all errors for the same file/line key into a single output EDN line - hence\nthe creation of ```BatchingEdnListener```.\n\n```EdnListener``` also has the ability to limit the set of fields produced by\nspecifying a list of fields to retain in the output EDN.\n\n## Building\n\nThe following instructions assume you have [Apache Ant](http://ant.apache.org/) installed and configured.\n\n```ant dist```\n\nThe ```dist``` target will compile the source and package it into a JAR file (```edn-listener.jar```)\nin the ```dist``` directory.\n\n## Configuration\n\nWhen using custom audit listeners in Checkstyle, they need to be referenced as a module\nin your Checkstyle configuration (usually stored in ```checkstyle.xml```) as a child\nmodule of ```Checker``` (see below).\n\n```$xslt\n\u003c?xml version=\"1.0\"?\u003e\n\u003c!DOCTYPE module PUBLIC\n          \"-//Puppy Crawl//DTD Check Configuration 1.3//EN\"\n          \"http://www.puppycrawl.com/dtds/configuration_1_3.dtd\"\u003e\n\n    \u003cmodule name=\"Checker\"\u003e\n\n        \u003cmodule name=\"BatchingEdnListener\"\u003e\n            \u003cproperty name=\"file\" value=\"output.edn\"/\u003e\n        \u003c/module\u003e\n\n        ...\n\t\n        \u003cmodule name=\"TreeWalker\"\u003e\n\n            ...\n\t\n        \u003c/module\u003e\n    \u003c/module\u003e\n```\n\nSee the [Aeolian Checkstyle config file](https://github.com/andeemarks/aeolian/blob/master/resources/checkstyle-all.xml) for an example of how the ```BatchingEdnListener```\nis used.\n\n## Sample Output\n\n## ```EdnListener```\n\nThe ```EdnListener``` output looks like:\n\n```$xslt\n{:source-file \"file\" :line 23 :column 45 :severity \"error\" :message \"Hello\" :source \"org.corvine.checkstyle.EdnListener\"}\n```\n\nwhere the keys are derived as follows:\n\n* ```source-file``` - the source file containing the Error\n* ```line``` - the line number containing the Error\n* ```column``` - the column containing the Error\n* ```severity``` - the string \"error\" as warnings are not captured\n* ```message``` - the message describing the error \n* ```source``` - the class name of the Checkstyle checker producing the error \n\n### ```BatchingEdnListener```\n\nFrom the above configuration, the ```BatchingEdnListener``` output would be stored in ```output.edn```, and would\ncontain a number of lines looking like:\n\n```$xslt\n{ :key \"file1#24\" :source-file \"file1\" :line 24 :org.corvine.checkstyle.EdnListener \"Hello\" }\n```\n\nwhere the keys are derived as follows:\n\n* ```key``` - the source file and line number concatenated\n* ```source-file``` - the source file containing the Error\n* ```line``` - the line number containing the Error\n* ```[source-name]``` - 1-n uniquely named entries with the class name of the \nCheckstyle checker producing the error and the error message itself as the value associated with the key","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeemarks%2Fcheckstyle-edn-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandeemarks%2Fcheckstyle-edn-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeemarks%2Fcheckstyle-edn-listener/lists"}