{"id":20367897,"url":"https://github.com/ksoichiro/fint","last_synced_at":"2026-05-28T20:31:23.963Z","repository":{"id":16940790,"uuid":"19702695","full_name":"ksoichiro/fint","owner":"ksoichiro","description":"A lightweight, simple source code check tool.","archived":false,"fork":false,"pushed_at":"2014-10-26T02:31:53.000Z","size":1456,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T19:44:22.026Z","etag":null,"topics":["cli","code-quality"],"latest_commit_sha":null,"homepage":"http://ksoichiro.github.io/fint/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ksoichiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-12T14:50:33.000Z","updated_at":"2023-02-13T17:08:27.000Z","dependencies_parsed_at":"2022-07-16T01:47:55.267Z","dependency_job_id":null,"html_url":"https://github.com/ksoichiro/fint","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ksoichiro/fint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2Ffint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2Ffint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2Ffint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2Ffint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksoichiro","download_url":"https://codeload.github.com/ksoichiro/fint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksoichiro%2Ffint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33626137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["cli","code-quality"],"created_at":"2024-11-15T00:35:21.535Z","updated_at":"2026-05-28T20:31:23.916Z","avatar_url":"https://github.com/ksoichiro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fint\n\n[![Build Status](https://travis-ci.org/ksoichiro/fint.svg?branch=master)](https://travis-ci.org/ksoichiro/fint)\n[![Coverage Status](https://img.shields.io/coveralls/ksoichiro/fint/master.svg)](https://coveralls.io/r/ksoichiro/fint?branch=master)\n\n**fint** is a lightweight, simple source code check tool,  \nbut doesn't have syntax analysis feature -- so it is a fake lint :P  \n**fint** is portable, executable on multiple platform, easy to integrate into your build process.\n\n![Example](https://raw.githubusercontent.com/ksoichiro/fint/master/docs/screenshot.png)\n\n## Installation\n\nThere are several methods to install fint.\n\n### Release binary\n\n[Get the latest release binary](https://github.com/ksoichiro/fint/releases/latest) for your environment.\n\n### Homebrew\n\nFor OS X users, you can install it with [Homebrew](http://brew.sh/).\n\n```sh\n$ brew tap ksoichiro/fint\n$ brew install fint\n```\n\n### Install as a golang package\n\nYou can also install it from master branch with golang environment.  \nThis is slightly unstable than release binaries, but may have some new useful features.\n\n```sh\n$ go get github.com/ksoichiro/fint\n```\n\n### Use gom\n\nIf you use this tool in a Xcode build process,\nusing [gom](https://github.com/mattn/gom) is the recommended way.  \nWith this tool, you can manage fint's version in your VCS.\n\n```sh\n$ go get github.com/mattn/gom\n$ echo \"gom 'github.com/ksoichiro/fint'\" \u003e Gomfile\n$ gom install\n$ tree -L 5\n.\n├── Gomfile\n└── _vendor\n    ├── bin\n    │   └── fint\n    └── src\n        └── github.com\n            └── ksoichiro\n                └── fint\n```\n\nNow you can use font tool like following command:\n\n```sh\n$ PATH=_vendor/bin:$PATH fint ...\nor\n$ _vendor/bin/fint ...\n```\n\n## Usage\n\n### For Objective-C, execute as a Xcode's \"Run Script\" of build phase\n\nIf your `GOPATH` is `~/go`, then put the following command\nto shell script form:\n\n```sh\nTERM=dumb ~/go/bin/fint run -s ${SRCROOT}/${PROJECT_NAME} -i objc\n```\n\nIf format error found, the command will exit with code 1, otherwise 0.  \nThe results will be shown to the source code like normal syntax warnings.\n\nSee sample Xcode projects in [`testdata/objc`](https://github.com/ksoichiro/fint/tree/master/testdata/objc) directory for details.\n\n### Execute on command line\n\nIf you exported `GOPATH` and `${GOPATH}/bin` is in your `PATH` then:\n\n```sh\n$ fint run -s testdata/objc/FintExample -i objc\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:12:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:14:1: warning: Space must be inserted between ']' and following message\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:14:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:18:1: warning: Space must be inserted before if\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:18:1: warning: Space must be inserted between ')' and '{'\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:19:1: warning: Space must be inserted between '//' and following comment\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:20:1: warning: Space must be inserted before else\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:20:1: warning: Space must be inserted before if\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:20:1: warning: Space must be inserted between ')' and '{'\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:22:1: warning: Space must be inserted after else\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:22:1: warning: Space must be inserted before else\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:24:1: warning: Space must be inserted after ','\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:32:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:33:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:38:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:39:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:44:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:49:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/FEAppDelegate.m:54:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExample/main.m:15:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExampleTests/FintExampleTests.m:19:1: warning: Line length exceeds 80 characters\ntestdata/objc/FintExample/FintExampleTests/FintExampleTests.m:24:1: warning: Line length exceeds 80 characters\n\n22 warnings generated.\n```\n\n### Commands\n\n| Option    | Description                                         |\n| --------- | --------------------------------------------------- |\n| `run`     | Execute lint.                                       |\n| `help`    | Show this help.                                     |\n| `version` | Show version of fint.                               |\n\n### Options\n\n| Option | Description                                            |\n| ------ | ------------------------------------------------------ |\n| `-i`   | ID of the target rule sets. Required.                  |\n| `-s`   | Source directory to be checked. Required.              |\n| `-c`   | Config files directory. Default value is `.fint`.      |\n| `-l`   | Message locale. Default value is `en`(English). Currently, `en` and `ja` is supported. |\n| `-h`   | HTML report directory. Optional.                       |\n| `-f`   | Force generating report to existing directory. Default value is `false`. |\n| `-q`   | Quiet mode. Suppresses output. Default value is `false`. |\n| `-template` | HTML report template name. Default value is `default`.  Currently, `default` and `dark` is available. |\n| `-fix` | Fix violations if possible. Default is `false`. |\n\n## Configuration\n\n### Structure\n\n    .fint\n    └── builtin\n        ├── modules\n        │   ├── max_length\n        │   │   └── config.json\n        │   └── pattern_match\n        │       └── config.json\n        ├── targets\n        │   ├── objc\n        │   │   ├── locales\n        │   │   │   ├── en.json\n        │   │   │   └── ja.json\n        │   │   └── ruleset.json\n        │   └── sh\n        │       ├── locales\n        │       │   ├── en.json\n        │       │   └── ja.json\n        │       └── ruleset.json\n        └── templates\n            ├── dark\n            │   ├── _index.html\n            │   ├── _index_srclist.html\n            │   ├── _src.html\n            │   ├── _src_srcline.html\n            │   ├── _src_violation_msg.html\n            │   ├── _src_violation_msglist.html\n            │   ├── css\n            │   │   ├── index.css\n            │   │   ├── main.css\n            │   │   └── src.css\n            │   └── js\n            │       └── src.js\n            └── default\n                ├── _index.html\n                ├── _index_srclist.html\n                ├── _src.html\n                ├── _src_srcline.html\n                ├── _src_violation_msg.html\n                ├── _src_violation_msglist.html\n                ├── css\n                │   ├── index.css\n                │   ├── main.css\n                │   └── src.css\n                └── js\n                    └── src.js\n\n### Configuration root directory\n\nAll the configurations for `fint` must be included in the `.fint` directory.  \nThis directory can be changed by `-c` option.\n\n### Targets\n\n`fint` needs to know which modules to use for lint and how to use the modules.  \n\"Target\" resolves them for a certain language or project.  \nTargets are located in `.fint/targets`.  \nTo select a target, specify subdirectory name with `-i` option.  \nAvailable targets:\n\n* objc\n* sh\n\nIn each target directories, `ruleset.json` must be located.  \nThis file defines the lint rule sets in the JSON format.\n\n| Item  | Description |\n| ----- | ----------- |\n| `rulesets` | JSON array that includes the rule sets. Target can have multiple rule sets because the projects will have multiple file-types and they need multiple rules for lint. |\n| `rulesets` \u003e `id` | ID of the rule set. Currently, this is just a comment and not used for lint. |\n| `rulesets` \u003e `description` |  Description of this rule set. This will not be used from the program for now. |\n| `rulesets` \u003e `modules` |  Module configurations for this rule set. See 'Modules' for details. |\n\n### Modules\n\n\"Module\" means the lint logic which defines how to check source files.  \nModules' has several descriptions and configurations.\n\n#### Description\n\nDescriptions for each modules are located in `.fint/modules`.  \nIn `.fint/module/[MODULE_NAME]/config.json`, following information is defined:\n\n| Item | Description |\n| ---- | ----------- |\n| `type` | Is the module built-in or external? |\n| `executable` | If it's external module, where is it? |\n| `description` | What is this module? |\n\n#### Configuration\n\nEach \"targets\" must have `ruleset.json` to define lint rule sets using \"modules\".  \nSo you should modify `ruleset.json` to configure modules.\n\nA normal built-in module have the following configuration structure:\n\n| Item | Description |\n| ---- | ----------- |\n| `id` | ID of the module. |\n| `pattern` | File path pattern to select target source file. |\n| `rules` | Rule for this modules. |\n| `rules` \u003e `id` | ID of the rule. This ID will be used in localization file. |\n| `rules` \u003e `args` | Arguments for the rule. Usage of this item will be different for each modules. |\n\n#### Localization\n\nLocale for lint warning messages.  \nTo select locales, specify locale name with `-l` option.  \nAvailable locales:\n\n* en\n* ja\n\nLocalized messages are defined in `.fint/builtin/targets/[TARGET_NAME]/locales/[LOCALE].json`.\n\n### HTML report\n\n`fint` can output HTML report.  \nTo use this feature, specify reporting directory with `-h` option.\n\nYou can also configure HTML template.  \nTo select a template, specify subdirectroy name with `-template` option.  \nAvailable templates:\n\n* default\n* dark\n\nTemplates are located in `.fint/builtin/templates/[TEMPLATE_NAME]`.\n\n## Built-in modules\n\n### Pattern match\n\nThis module checks if the line matching the pattern.  \n\n| Item  | Description |\n| ----- | ----------- |\n| `id` | `pattern_match` |\n| `rules` \u003e `args` (0) | Forbidden pattern of the line. |\n| `rules` \u003e `args` (1) | Exclude pattern for matched string. |\n| `rules` \u003e `args` (2) | Replacement string for auto-fix feature. |\n\n### Max length\n\nThis module checks if the line exceeds a certain length.\n\n| Item  | Description |\n| ----- | ----------- |\n| `id` | `max_length` |\n| `rules` \u003e `args` (0) | Pattern of the line to check length. |\n| `rules` \u003e `args` (1) | One element with max length. |\n\n## License\n\nCopyright (c) 2014 Soichiro Kashima  \nLicensed under MIT license.  \nSee the bundled [LICENSE](https://github.com/ksoichiro/fint/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksoichiro%2Ffint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksoichiro%2Ffint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksoichiro%2Ffint/lists"}