typo_checker 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a70148af1265992e4ad1912242058765ec6b16079e7ec928b97ea9eef03b7c1e
4
+ data.tar.gz: 4577201281037b384f51b07ad7b20506ea1a2aa7e486e57cf06823448dff99f5
5
+ SHA512:
6
+ metadata.gz: 9b71c09497ee8dd367e99dc63e69faa599b9c9c61579d108544e066b5a6839e7fd967989d588bfeef3983c38a7c4786ef50595bf306f4cea168f1e7aba301832
7
+ data.tar.gz: 86f01baf7fe9e3147503f1ebbec821d9b25c78c79a3469d7288400bf95d374e97e8217d545a1a058d114aee3757c946c40ba65e6676740b1624086ba9d8b3a00
data/CHANGELOG.md ADDED
File without changes
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2022] [datpmt]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # TypoChecker
2
+
3
+ TypoChecker is a tool for scanning source code files for common typographical errors. The tool checks through text-based files in a given repository to identify and suggest corrections for any matches found.
4
+
5
+ ## Features
6
+
7
+ - **Automatic typo detection**: Scan through files in a repository for known typos.
8
+ - **Support for multiple file types**: It checks various source code and text file extensions.
9
+ - **Colorized output**: Provides color-coded feedback for easier identification of typos.
10
+
11
+ ## Installation
12
+
13
+ To install the TypoChecker gem, you can install it directly using `gem install`.
14
+
15
+ Run the following command in your terminal to install the gem globally:
16
+
17
+ ```bash
18
+ gem install typo_checker
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Once installed, you can use TypoChecker in your Ruby project to scan a directory (or the current directory by default) for typos.
24
+
25
+ ```bash
26
+ # typo_checker scan /path/repo
27
+ typo_checker scan . # current repo
28
+ ```
29
+
30
+ ### Output
31
+ When a typo is found, the tool prints out the following information in a colorized format:
32
+
33
+ - File path and line number in light blue.
34
+ - Incorrect word in red.
35
+ - Suggested correction in green.
36
+
37
+ Example output:
38
+
39
+ ```bash
40
+ Typo found in /path/to/file.rb:10:15: myFuncton() -> myFunction()
41
+ ```
42
+
43
+ ## File Types Supported
44
+
45
+ TypoChecker supports the following file types by default:
46
+ - .rb (Ruby)
47
+ - .txt (Text)
48
+ - .md (Markdown)
49
+ - .html (HTML)
50
+ - .css (CSS)
51
+ - .js (JavaScript)
52
+ - .py (Python)
53
+ - .java (Java)
54
+ - .php (PHP)
55
+ - .go (Go)
56
+ - .swift (Swift)
57
+ - .ts (TypeScript)
58
+ - .scala (Scala)
59
+ - .c (C)
60
+ - .cpp (C++)
61
+ - .csharp (C#)
62
+ - .h (C Header)
63
+ - .lua (Lua)
64
+ - .pl (Perl)
65
+ - .rs (Rust)
66
+ - .kt (Kotlin)
67
+ - .sh, .bash, .bat (Shell Scripts)
68
+ - .json (JSON)
69
+ - .yaml (YAML)
70
+ - .xml (XML)
71
+ - .scss (Sass/SCSS)
72
+ - .tsv (Tab-separated values)
73
+ - .ps1 (PowerShell)
74
+ - .clj (Clojure)
75
+ - .elixir (Elixir)
76
+ - .f# (F#)
77
+ - .vhdl, .verilog (Hardware description languages)
78
+ - .ada (Ada)
79
+ - .ml (OCaml)
80
+ - .lisp (Lisp)
81
+ - .prolog (Prolog)
82
+ - .tcl (Tcl)
83
+ - .rexx (Rexx)
84
+ - .awk (AWK)
85
+ - .sed (Sed)
86
+ - .coffee (CoffeeScript)
87
+ - .groovy (Groovy)
88
+ - .dart (Dart)
89
+ - .haxe (Haxe)
90
+ - .zig (Zig)
91
+ - .nim (Nim)
92
+ - .crystal (Crystal)
93
+ - .reason (Reason)
94
+ - .ocaml (OCaml)
95
+ - .forth (Forth)
96
+ - .v (V)
97
+ - .xhtml (XHTML)
98
+ - .julia (Julia)
99
+ - .racket (Racket)
100
+ - .scheme (Scheme)
101
+ - .rust (Rust)
102
+ - .graphql (GraphQL)
103
+
104
+ ## Contributing
105
+
106
+ We welcome contributions to this project! To contribute:
107
+
108
+ 1. Fork the repository.
109
+ 2. Create a new feature branch (git checkout -b your-feature).
110
+ 3. Commit your changes (git commit -am 'Add some feature').
111
+ 4. Push the changes to your fork (git push origin your-feature).
112
+ 5. Open a pull request.
113
+
114
+ ## Contributors
115
+
116
+ - Tran Dang Duc Dat ([datpmt](https://github.com/datpmt))
117
+
118
+ ## License
119
+ The gem is available as open source under the terms of the [MIT License](LICENSE).
data/bin/typo_checker ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/typo_checker/cli'
3
+
4
+ TypoChecker::CLI.start(ARGV)