Skip to content

Commit 84f2270

Browse files
authored
typos suggestion (#477)
* chore: fix acronyms and registered brands * chore: fix typos and style * chore: fix British style
1 parent b630cad commit 84f2270

File tree

15 files changed

+45
-45
lines changed

15 files changed

+45
-45
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ A [snap install](https://snapcraft.io/scc) exists thanks to [Ricardo](https://fe
4545

4646
#### Homebrew
4747

48-
Or if you have [homebrew](https://brew.sh/) installed
48+
Or if you have [Homebrew](https://brew.sh/) installed
4949

5050
`$ brew install scc`
5151

@@ -166,8 +166,8 @@ Interesting reading about other code counting projects tokei, loc, polyglot and
166166
Further reading about processing files on the disk performance
167167

168168
- https://blog.burntsushi.net/ripgrep/
169-
170-
Using `scc` to process 40 TB of files from Github/Bitbucket/Gitlab
169+
170+
Using `scc` to process 40 TB of files from GitHub/Bitbucket/GitLab
171171

172172
- https://boyter.org/posts/an-informal-survey-of-10-million-github-bitbucket-gitlab-projects/
173173

@@ -187,7 +187,7 @@ Why use `scc`?
187187
- Able to identify many #! files ADVANCED! https://github.com/boyter/scc/issues/115
188188
- Can ignore large files by lines or bytes
189189
- Can calculate the ULOC or unique lines of code by file, language or project
190-
- Supports multiple output formats for integration, csv, sql, json, html and more
190+
- Supports multiple output formats for integration, CSV, SQL, JSON, HTML and more
191191

192192
Why not use `scc`?
193193

@@ -402,7 +402,7 @@ The increment happens for each of the matching conditions and produces the numbe
402402
### Unique Lines of Code (ULOC)
403403

404404
ULOC stands for Unique Lines of Code and represents the unique lines across languages, files and the project itself. This idea was taken from
405-
https://cmcenroe.me/2018/12/14/uloc.html where the calculation is presented using standard unix tools `sort -u *.h *.c | wc -l`. This metric is
405+
https://cmcenroe.me/2018/12/14/uloc.html where the calculation is presented using standard Unix tools `sort -u *.h *.c | wc -l`. This metric is
406406
there to assist with the estimation of complexity within the project. Quoting the source
407407

408408
> In my opinion, the number this produces should be a better estimate of the complexity of a project. Compared to SLOC, not only are blank lines discounted, but so are close-brace lines and other repetitive code such as common includes. On the other hand, ULOC counts comments, which require just as much maintenance as the code around them does, while avoiding inflating the result with license headers which appear in every file, for example.
@@ -440,7 +440,7 @@ Processed 8407821 bytes, 8.408 megabytes (SI)
440440
───────────────────────────────────────────────────────────────────────────────
441441
```
442442

443-
Futher reading about the ULOC caluclation can be found at https://boyter.org/posts/sloc-cloc-code-new-metic-uloc/
443+
Further reading about the ULOC calculation can be found at https://boyter.org/posts/sloc-cloc-code-new-metic-uloc/
444444

445445
### COCOMO
446446

@@ -553,7 +553,7 @@ Note that in all cases if the remap rule does not apply normal #! rules will app
553553

554554
### Output Formats
555555

556-
By default `scc` will output to the console. However you can produce output in other formats if you require.
556+
By default `scc` will output to the console. However, you can produce output in other formats if you require.
557557

558558
The different options are `tabular, wide, json, csv, csv-stream, cloc-yaml, html, html-table, sql, sql-insert, openmetrics`.
559559

@@ -562,7 +562,7 @@ write your output to. For example `scc -f html -o output.html` will run `scc` ag
562562
the results in html to the file `output.html`.
563563

564564
You can also write to multiple output files, or multiple types to stdout if you want using the `--format-multi` option. This is
565-
most useful when working in CI/CD systems where you want HTML reports as an artefact while also displaying the counts in stdout.
565+
most useful when working in CI/CD systems where you want HTML reports as an artifact while also displaying the counts in stdout.
566566

567567
```
568568
scc --format-multi "tabular:stdout,html:output.html,csv:output.csv"
@@ -757,7 +757,7 @@ scc_bytes{language="Go",file="./bbbb.go"} 1000
757757

758758
Generally `scc` will the fastest code counter compared to any I am aware of and have compared against. The below comparisons are taken from the fastest alternative counters. See `Other similar projects` above to see all of the other code counters compared against. It is designed to scale to as many CPU's cores as you can provide.
759759

760-
However if you want greater performance and you have RAM to spare you can disable the garbage collector like the following on linux `GOGC=-1 scc .` which should speed things up considerably. For some repositories turning off the code complexity calculation via `-c` can reduce runtime as well.
760+
However if you want greater performance and you have RAM to spare you can disable the garbage collector like the following on Linux `GOGC=-1 scc .` which should speed things up considerably. For some repositories turning off the code complexity calculation via `-c` can reduce runtime as well.
761761

762762
Benchmarks are run on fresh 32 Core CPU Optimised Digital Ocean Virtual Machine 2022/09/20 all done using [hyperfine](https://github.com/sharkdp/hyperfine) with 3 warm-up runs and 10 timed runs.
763763

@@ -899,7 +899,7 @@ The `--format-multi` option is especially useful in CI/CD where you want to get
899899

900900
If you want to hack away feel free! PR's are accepted. Some things to keep in mind. If you want to change a language definition you need to update `languages.json` and then run `go generate` which will convert it into the `processor/constants.go` file.
901901

902-
For all other changes ensure you run all tests before submitting. You can do so using `go test ./...`. However for maximum coverage please run `test-all.sh` which will run `gofmt`, unit tests, race detector and then all of the integration tests. All of those must pass to ensure a stable release.
902+
For all other changes ensure you run all tests before submitting. You can do so using `go test ./...`. However, for maximum coverage please run `test-all.sh` which will run `gofmt`, unit tests, race detector and then all of the integration tests. All of those must pass to ensure a stable release.
903903

904904
### API Support
905905

@@ -987,7 +987,7 @@ Packaging as of version v3.1.0 is done through https://goreleaser.com/
987987

988988
Note if you plan to run `scc` in Alpine containers you will need to build with CGO_ENABLED=0.
989989

990-
See the below dockerfile as an example on how to achieve this based on this issue https://github.com/boyter/scc/issues/208
990+
See the below Dockerfile as an example on how to achieve this based on this issue https://github.com/boyter/scc/issues/208
991991

992992
```
993993
FROM golang as scc-get
@@ -1043,10 +1043,10 @@ You can find the source code for badges in the repository at https://github.com/
10431043

10441044
#### A example for each supported provider
10451045

1046-
- github - https://sloc.xyz/github/boyter/scc/
1046+
- Github - https://sloc.xyz/github/boyter/scc/
10471047
- sr.ht - https://sloc.xyz/sr.ht/~nektro/magnolia-desktop/
1048-
- bitbucket - https://sloc.xyz/bitbucket/boyter/decodingcaptchas
1049-
- gitlab - https://sloc.xyz/gitlab/esr/loccount
1048+
- Bitbucket - https://sloc.xyz/bitbucket/boyter/decodingcaptchas
1049+
- Gitlab - https://sloc.xyz/gitlab/esr/loccount
10501050

10511051
### Languages
10521052

cmd/badges/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def lambda_handler(event, context):
5757
title = 'Blank lines'
5858
s = format_count(sum([x['Blank'] for x in j]))
5959
elif t == 'lines':
60-
pass # its the default anyway
60+
pass # it's the default anyway
6161
elif t == 'comments':
6262
title = 'Comments'
6363
s = format_count(sum([x['Comment'] for x in j]))

examples/issue339/matlab.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
s = char(s) ;
358358
total = 0 ;
359359

360-
% initialize stats stucture with same fields and same order as
360+
% initialize stats structure with same fields and same order as
361361
% stats_{1}
362362
stats__ = stats_{1} ;
363363
names = fieldnames(stats__.(s))' ;

examples/language/fsl.fsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Start -> "Is your Twitter for personal or business use?";
3333
"Does your boss follow you?" 'Yes'
3434
-> "Get off Twitter";
3535
"Does your boss follow you?" 'No'
36-
-> "Are you just using Twitter to stalk celebrites?" -> "Get off Twitter and seek help";
36+
-> "Are you just using Twitter to stalk celebrities?" -> "Get off Twitter and seek help";
3737

3838
"Are a majority of your tweets interesting,\n funny, or thought-provoking?" 'No, they are mostly pics of my lunch or my cat'
3939
-> "Are you a celebrity";
@@ -90,7 +90,7 @@ Start -> "Is your Twitter for personal or business use?";
9090
"Wait - Are you spam or a bot?" <- 'Yes' "You understand what Twitter is, right?";
9191

9292
"How often do you tweet?" 'Hardly ever'
93-
-> "Are you just using Twitter to stalk celebrites?";
93+
-> "Are you just using Twitter to stalk celebrities?";
9494
"How often do you tweet?" '15 times a month'
9595
-> "Do you only keep your twitter account\n for the rush you feel when your tweet is retweeted?";
9696
"How often do you tweet?" 'Almost everyday'

examples/language/graphql.graphql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21009,7 +21009,7 @@ type MergeQueueConfiguration {
2100921009
minimumEntriesToMerge: Int
2101021010

2101121011
"""
21012-
The amount of time in minutes to wait before ignoring the minumum number of
21012+
The amount of time in minutes to wait before ignoring the minimum number of
2101321013
entries in the queue requirement and merging a collection of entries
2101421014
"""
2101521015
minimumEntriesToMergeWaitTime: Int
@@ -54812,12 +54812,12 @@ enum ThreadSubscriptionState {
5481254812
IGNORING_THREAD
5481354813

5481454814
"""
54815-
The User is not recieving notifications from this thread
54815+
The User is not receiving notifications from this thread
5481654816
"""
5481754817
NONE
5481854818

5481954819
"""
54820-
The User is notified becuase they are watching the list
54820+
The User is notified because they are watching the list
5482154821
"""
5482254822
SUBSCRIBED_TO_LIST
5482354823

processor/bloom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func BloomHash(b byte) uint64 {
2525
// The logic here is to slice a value between 0 and 63 from k, and set a
2626
// single bit in the output hash based on that.
2727
// Setting three bits this way seems to give the best results. Fewer bits
28-
// makes the hash not unique enough, more leads to overcrowding the bloom
28+
// make the hash not unique enough, more leads to overcrowding the bloom
2929
// filter.
3030
var hash uint64
3131
for i := uint64(0); i < 3; i++ {

processor/detector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func scanForSheBang(content []byte) (string, error) {
107107
candidate1 = string(content[lastSlash+1 : i+1])
108108
}
109109

110-
// between last slash and here is the first candidate which is either env or perl/php/python etc..
110+
// between last slash and here is the first candidate which is either env or Perl/PHP/Python etc..
111111
if isWhitespace(content[i]) {
112112
// mark from lastSlash to here as first argument
113113
candidate1 = string(content[lastSlash+1 : i])
@@ -151,7 +151,7 @@ type languageGuess struct {
151151
// DetermineLanguage given a filename, fallback language, possible languages and content make a guess to the type.
152152
// If multiple possible it will guess based on keywords similar to how https://github.com/vmchale/polyglot does
153153
func DetermineLanguage(filename string, fallbackLanguage string, possibleLanguages []string, content []byte) string {
154-
// If being called through an API its possible nothing is set here and as
154+
// If being called through an API it's possible nothing is set here and as
155155
// such should just return as the Language value should have already been set
156156
if len(possibleLanguages) == 0 {
157157
return fallbackLanguage
@@ -192,7 +192,7 @@ func DetermineLanguage(filename string, fallbackLanguage string, possibleLanguag
192192
// and as such the default fallback if we don't find a suitable number of matching
193193
// keywords
194194
// consider YAML files for example, where cloudformation files can also be YAML
195-
// YAML can have any form so its not possible to say "this is a yaml file"
195+
// YAML can have any form so it's not possible to say "this is a yaml file"
196196
// so we can only say "this is likely to be a cloudformation file", and as such
197197
// we need to handle a fallback case, which in this case is nothing
198198
if len(langFeatures.Keywords) == 0 {

processor/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
var extensionCache sync.Map
1616

1717
// A custom version of extracting extensions for a file
18-
// which also has a case insensitive cache in order to save
18+
// which also has a case-insensitive cache in order to save
1919
// some needless processing
2020
func getExtension(name string) string {
2121
name = strings.ToLower(name)

processor/formatters.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func toCSVSummary(input chan *FileJob) string {
314314
}
315315

316316
// Cater for the common case of adding plural even for those options that don't make sense
317-
// as its quite common for those who English is not a first language to make a simple mistake
317+
// as it's quite common for those who English is not a first language to make a simple mistake
318318
switch {
319319
case SortBy == "name" || SortBy == "names" || SortBy == "language" || SortBy == "languages":
320320
sort.Slice(records, func(i, j int) bool {
@@ -405,7 +405,7 @@ func toCSVFiles(input chan *FileJob) string {
405405
}
406406

407407
// Cater for the common case of adding plural even for those options that don't make sense
408-
// as its quite common for those who English is not a first language to make a simple mistake
408+
// as it's quite common for those who English is not a first language to make a simple mistake
409409
switch {
410410
case SortBy == "name" || SortBy == "names":
411411
sort.Slice(records, func(i, j int) bool {
@@ -861,7 +861,7 @@ func fileSummarizeMulti(input chan *FileJob) string {
861861
val = toCSV(i)
862862
case "csv-stream":
863863
val = toCSVStream(i)
864-
// special case where we want to ignore writing to stdout ot disk as its already done
864+
// special case where we want to ignore writing to stdout to disk as it's already done
865865
continue
866866
case "html":
867867
val = toHtml(i)
@@ -964,7 +964,7 @@ func fileSummarizeLong(input chan *FileJob) string {
964964
}
965965

966966
// Cater for the common case of adding plural even for those options that don't make sense
967-
// as its quite common for those who English is not a first language to make a simple mistake
967+
// as it's quite common for those who English is not a first language to make a simple mistake
968968
switch {
969969
case SortBy == "name" || SortBy == "names" || SortBy == "language" || SortBy == "langs":
970970
sort.Slice(language, func(i, j int) bool {
@@ -1498,7 +1498,7 @@ func aggregateLanguageSummary(input chan *FileJob) []LanguageSummary {
14981498

14991499
func sortLanguageSummary(language []LanguageSummary) []LanguageSummary {
15001500
// Cater for the common case of adding plural even for those options that don't make sense
1501-
// as its quite common for those who English is not a first language to make a simple mistake
1501+
// as it's quite common for those who English is not a first language to make a simple mistake
15021502
// NB in any non name cases if the values are the same we sort by name to ensure
15031503
// deterministic output
15041504
switch {

processor/processor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ func ProcessConstants() {
271271
// Configure COCOMO setting
272272
_, ok := projectType[strings.ToLower(CocomoProjectType)]
273273
if !ok {
274-
// lets see if we can turn it into a custom one
274+
// let's see if we can turn it into a custom one
275275
spl := strings.Split(CocomoProjectType, ",")
276276
val := []float64{}
277277
if len(spl) == 5 {
278-
// lets try to convert to float if we can
278+
// let's try to convert to float if we can
279279
for i := 1; i < 5; i++ {
280280
f, err := strconv.ParseFloat(spl[i], 64)
281281
if err == nil {

0 commit comments

Comments
 (0)