{"id":23508724,"url":"https://github.com/lovasko/tw","last_synced_at":"2025-05-13T15:34:45.160Z","repository":{"id":56881116,"uuid":"61458926","full_name":"lovasko/tw","owner":"lovasko","description":"Trailing Whitespace Detector","archived":false,"fork":false,"pushed_at":"2016-10-31T17:18:17.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T11:55:35.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovasko.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":"2016-06-19T01:04:38.000Z","updated_at":"2016-11-06T17:21:02.000Z","dependencies_parsed_at":"2022-08-20T23:40:08.061Z","dependency_job_id":null,"html_url":"https://github.com/lovasko/tw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasko%2Ftw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasko%2Ftw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasko%2Ftw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasko%2Ftw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovasko","download_url":"https://codeload.github.com/lovasko/tw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253970544,"owners_count":21992521,"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","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":[],"created_at":"2024-12-25T11:31:46.086Z","updated_at":"2025-05-13T15:34:45.087Z","avatar_url":"https://github.com/lovasko.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tw\n\n[![Build Status](https://travis-ci.org/lovasko/tw.svg?branch=master)]\n(https://travis-ci.org/lovasko/tw)\n\nTrailing whitespace detector `tw` command-line utility scans a set of\nfiles and tests each line of each file for whitespace characters at its\nend. The utility processes only a limited set of characters at a time and\ntherefore can be used with files that contain arbitrarily many lines.\n\n\n## Usage\nThe utility accepts zero or more arguments: when the argument count is\nzero, `stdin` is used, otherwise the arguments are used as paths to the\nfiles.\n\n### Synopsis\n```\ntw [FILE ...]\n```\n\n\n## Return code\nThe `tw` utility returns `1` if any lines with trailing whitespace in any\nof the files were found, `0` otherwise.\n\n\n## Example\nFollowing example examines all standard library C header files that were\nshipped with the FreeBSD operating system version 10.0. Apparently,\n`stdlib.h` contains one line with trailing whitespace, which is further\nproved by a small `sed` script that quotes the incriminated line:\n\n```sh\n$ freebsd-version\n10.0-RELEASE\n\n$ tw /usr/include/std*.h\n/usr/include/stdlib.h: 258\n\n$ echo $?\n1\n\n$ sed -n '258s/\\(.*\\)/\"\\1\"/p' /usr/include/stdlib.h\n\"__uint32_t \"\n```\n\n\n## Build\nTo compile and run the utility, use the following commands:\n```sh\n$ stack build --pedantic\n$ stack exec tw /path/to/file\n```\n\n\n## License\nThe source code is licensed under the 3-clause BSD license (for more\ninformation please consult the [LICENSE](LICENSE.md) file). In case you\nneed a different license, feel free to contact the author.\n\n\n## Author\nDaniel Lovasko \u003cdaniel.lovasko@gmail.com\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasko%2Ftw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovasko%2Ftw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasko%2Ftw/lists"}