{"id":20234275,"url":"https://github.com/immoh/lein-nsorg","last_synced_at":"2025-09-04T06:35:48.248Z","repository":{"id":57713811,"uuid":"126841782","full_name":"immoh/lein-nsorg","owner":"immoh","description":"Leiningen plugin for organizing ns form","archived":false,"fork":false,"pushed_at":"2019-11-25T17:19:30.000Z","size":24,"stargazers_count":47,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-22T00:45:57.965Z","etag":null,"topics":["clojure","code-style","leiningen","ns-forms"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/immoh.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}},"created_at":"2018-03-26T14:31:36.000Z","updated_at":"2025-06-04T20:51:37.000Z","dependencies_parsed_at":"2022-08-25T10:30:47.082Z","dependency_job_id":null,"html_url":"https://github.com/immoh/lein-nsorg","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/immoh/lein-nsorg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immoh%2Flein-nsorg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immoh%2Flein-nsorg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immoh%2Flein-nsorg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immoh%2Flein-nsorg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immoh","download_url":"https://codeload.github.com/immoh/lein-nsorg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immoh%2Flein-nsorg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273566874,"owners_count":25128629,"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-09-04T02:00:08.968Z","response_time":61,"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":["clojure","code-style","leiningen","ns-forms"],"created_at":"2024-11-14T08:09:34.952Z","updated_at":"2025-09-04T06:35:48.173Z","avatar_url":"https://github.com/immoh.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lein-nsorg \n\nLeiningen plugin for organizing `ns` form in a way that whitespace and comments are preserved.\n\nRules to apply are fully customizable; the default implementation\n\n* sorts `:require`, `:require-macros`, `:use` and `:use-macros` libspecs alphabetically and removes duplicates\n* sorts `:import` class names alphabetically and removes duplicates\n* sorts `:exclude`, `:only`, `:refer`, `:refer-macros` and `:rename` options alphabetically and removes duplicates\n\nAlso available as Clojure library [nsorg](https://github.com/immoh/nsorg/)\nand command line tool [nsorg-cli](https://github.com/immoh/nsorg-cli/).\n\n\n## Installation\n\nDependency information:\n\n```clj\n[lein-nsorg \"0.3.0\"]\n```\n\n## Usage\n\n```\nlein nsorg\n```\n\nExample output:\n```\n...\nin ./src/perf/clojure/clojure/java/perf_jdbc.clj:\n   These test compare the raw performance (against an in-memory H2 database)\n   for hand-crafted Java JDBC calls and various `query` and `reducible-query`\n   calls.\"\n-  (:require [criterium.core :as cc]\n-            [clojure.java.jdbc :as sql])\n-  (:import (java.sql Connection PreparedStatement ResultSet Statement ResultSetMetaData)))\n+  (:require [clojure.java.jdbc :as sql]\n+            [criterium.core :as cc])\n+  (:import (java.sql Connection PreparedStatement ResultSet ResultSetMetaData Statement)))\n\n (defn calibrate []\n   ;; 840ms\n...\n\nChecked 5 files, found problems in 3 files\n```\n\n### Paths\n\nPaths to check can be given as arguments to the plugin:\n\n```\nlein nsorg src dev/src\n```\n\nIf no locations are given default location is:\n\n* `:source-paths` and `:test-paths` if plugin is run inside Leiningen project\n* current directory if plugin is run outside Leiningen project\n\n\n### Ignoring files\n\nYou can ignore a specific file or directory by excluding it from command-line:\n\n```\nlein nsorg --exclude src/my-project/broken_file.clj --exclude test\n```\n\n### Apply changes automatically\n\nBy default lein-nsorg prints diffs for suggested changes. Changes can be applied automatically to source files with the\nfollowing option:\n\n```\nlein nsorg --replace\n```\n\n### Interactive mode\n\nInstead of applying changes automatically interactive mode asks for each file if suggestions should be applied or not:\n\n```\nlein nsorg --replace --interactive\n```\n\n## License\n\nCopyright © 2018 Immo Heikkinen\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmoh%2Flein-nsorg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmoh%2Flein-nsorg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmoh%2Flein-nsorg/lists"}