Repository: gofr-dev/gofr

Issue:
Document American English is preferred in CONTRIBUTIONS.md
As stated here

> we follow American English conventions in this project, so the use of "favor" is intentional and not a typo.
_Originally posted by @coolwednesday in https://github.com/gofr-dev/gofr/pull/1656#issuecomment-2818107218_

This should be mentioned in the contributions information


Hints from issue comments:
@Omar8345: will work on this, @vikash 

Solution patch:
diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml
new file mode 100644
index 00000000..239f8962
--- /dev/null
+++ b/.github/workflows/typos.yml
@@ -0,0 +1,12 @@
+name: Typos Check
+on:
+  push:
+  pull_request:
+jobs:
+  typos:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v4
+      - name: typos-action
+        uses: crate-ci/typos@v1.31.2
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 87b93c7f..e6183a7d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -5,7 +5,9 @@
 * (Optional) If you want to discuss your implementation with the users of GoFr, use the GitHub discussions of this repo.
 * Configure your editor to use goimport and golangci-lint on file changes. Any code which is not formatted using these
   tools, will fail on the pipeline.
+<!-- spellchecker:off "favour" have to be ignored here -->
 * We follow **American English** conventions in this project (e.g., *"favor"* instead of *"favour"*). Please keep this consistent across all code comments, documentation, etc.
+<!-- spellchecker:on -->
 * All code contributions should have associated tests and all new line additions should be covered in those testcases.
   No PR should ever decrease the overall code coverage.
 * Once your code changes are done along with the testcases, submit a PR to development branch. Please note that all PRs
diff --git a/docs/advanced-guide/handling-data-migrations/page.md b/docs/advanced-guide/handling-data-migrations/page.md
index cf219a34..a57cba06 100644
--- a/docs/advanced-guide/handling-data-migrations/page.md
+++ b/docs/advanced-guide/handling-data-migrations/page.md
@@ -78,7 +78,7 @@ func All() map[int64]migration.Migrate {
 
 Migrations run in ascending order of keys in this map.
 
-### Initialisation from main.go
+### Initialization from main.go
 
 ```go
 package main
diff --git a/docs/advanced-guide/handling-file/page.md b/docs/advanced-guide/handling-file/page.md
index 8103fa53..ebbbf35e 100644
--- a/docs/advanced-guide/handling-file/page.md
+++ b/docs/advanced-guide/handling-file/page.md
@@ -4,9 +4,9 @@ GoFr simplifies the complexity of working with different file stores by offering
 
 ## USAGE
 
-By default, local file-store is initialised and user can access it from the context.
+By default, local file-store is initialized and user can access it from the context.
 
-GoFr also supports FTP/SFTP file-store. Developers can also connect and use their AWS S3 bucket as a file-store. The file-store can be initialised as follows:
+GoFr also supports FTP/SFTP file-store. Developers can also connect and use their AWS S3 bucket as a file-store. The file-store can be initialized as follows:
 
 ### FTP file-store
 ```go
diff --git a/docs/advanced-guide/http-authentication/page.md b/docs/advanced-guide/http-authentication/page.md
index 2531d556..0cbc9764 100644
--- a/docs/advanced-guide/http-authentication/page.md
+++ b/docs/advanced-guide/http-authentication/page.md
@@ -85,7 +85,7 @@ GoFr offers two ways to implement API Keys authentication.
 package main
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.EnableAPIKeyAuth("9221e451-451f-4cd6-a23d-2b2d3adea9cf", "0d98ecfe-4677-48aa-b463-d43505766915")
@@ -109,7 +109,7 @@ func apiKeyValidator(c *container.Container, apiKey string) bool {
 }
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.EnableAPIKeyAuthWithValidator(apiKeyValidator)
diff --git a/docs/advanced-guide/publishing-custom-metrics/page.md b/docs/advanced-guide/publishing-custom-metrics/page.md
index e3fb0dc6..55c30fe0 100644
--- a/docs/advanced-guide/publishing-custom-metrics/page.md
+++ b/docs/advanced-guide/publishing-custom-metrics/page.md
@@ -28,7 +28,7 @@ import (
 )
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.Metrics().NewCounter("transaction_success", "used to track the count of successful transactions")
@@ -58,7 +58,7 @@ import (
 )
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.Metrics().NewUpDownCounter("total_credit_day_sale", "used to track the total credit sales in a day")
@@ -88,7 +88,7 @@ import (
 )
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.Metrics().NewHistogram("transaction_time", "used to track the time taken by a transaction",
@@ -124,7 +124,7 @@ import (
 )
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.Metrics().NewGauge("product_stock", "used to track the number of products in stock")
@@ -178,7 +178,7 @@ import (
 )
 
 func main() {
-	// Initialise gofr object
+	// Initialize gofr object
 	a := gofr.New()
 
 	// Add custom metrics
@@ -222,7 +222,7 @@ When a registered metrics has to be used 3 key pieces of information are require
 - A set of key-value pairs called tags or labels.
 
 A permutation of these key-value values provides the metric cardinality.
-Lower the cardinality, faster the query performance and lower the monitoring resource utilisation.
+Lower the cardinality, faster the query performance and lower the monitoring resource utilization.
 ```
 
 > #### Check out the example on how to publish custom metrics in GoFr: [Visit GitHub](https://github.com/gofr-dev/gofr/blob/main/examples/using-custom-metrics/main.go)
diff --git a/docs/advanced-guide/using-publisher-subscriber/page.md b/docs/advanced-guide/using-publisher-subscriber/page.md
index d70ccc2e..ff7ee96b 100644
--- a/docs/advanced-guide/using-publisher-subscriber/page.md
+++ b/docs/advanced-guide/using-publisher-subscriber/page.md
@@ -47,7 +47,7 @@ that are specific for the type of message broker user wants to use.
 ---
 
 - `PUBSUB_BROKER`
-- Address to connect to kafka broker. Multiple brokers can be added as comma seperated values.
+- Address to connect to kafka broker. Multiple brokers can be added as comma separated values.
 - `+`
 -
 - `localhost:9092` or `localhost:8087,localhost:8088,localhost:8089`
diff --git a/docs/quick-start/add-rest-handlers/page.md b/docs/quick-start/add-rest-handlers/page.md
index e2d5f6ca..130fa01f 100644
--- a/docs/quick-start/add-rest-handlers/page.md
+++ b/docs/quick-start/add-rest-handlers/page.md
@@ -3,7 +3,7 @@
 GoFr simplifies the process of implementing CRUD (Create, Read, Update, Delete) operations by enabling the automatic generation of handlers directly from Go structs.
 This feature eliminates the need for writing repetitive boilerplate code, allowing developers to focus on application logic.
 
-## Default Behaviour
+## Default Behavior
 
 If the custom handlers ain't implemented on the struct, GoFr provides default handlers for each CRUD operation. These handlers handle basic database interactions:
 
diff --git a/docs/quick-start/connecting-mysql/page.md b/docs/quick-start/connecting-mysql/page.md
index 4a197896..d775b512 100644
--- a/docs/quick-start/connecting-mysql/page.md
+++ b/docs/quick-start/connecting-mysql/page.md
@@ -61,7 +61,7 @@ type Customer struct {
 }
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.GET("/redis", func(ctx *gofr.Context) (any, error) {
diff --git a/docs/quick-start/introduction/page.md b/docs/quick-start/introduction/page.md
index 4269cd6e..18e91dc4 100644
--- a/docs/quick-start/introduction/page.md
+++ b/docs/quick-start/introduction/page.md
@@ -28,7 +28,7 @@ package main
 import "gofr.dev/pkg/gofr"
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	// register route greet
diff --git a/docs/references/testing/page.md b/docs/references/testing/page.md
index 1409545b..53f78161 100644
--- a/docs/references/testing/page.md
+++ b/docs/references/testing/page.md
@@ -50,7 +50,7 @@ func Add(ctx *gofr.Context) (any, error) {
 }
 
 func main() {
-	// initialise gofr object
+	// initialize gofr object
 	app := gofr.New()
 
 	app.POST("/book", Add)
diff --git a/examples/http-server/docker/provisioning/dashboards/gofr-dashboard/dashboards.json b/examples/http-server/docker/provisioning/dashboards/gofr-dashboard/dashboards.json
index 6f4c51fc..8f604e5c 100644
--- a/examples/http-server/docker/provisioning/dashboards/gofr-dashboard/dashboards.json
+++ b/examples/http-server/docker/provisioning/dashboards/gofr-dashboard/dashboards.json
@@ -532,7 +532,7 @@
           "refId": "B"
         }
       ],
-      "title": "Memory Utilisation",
+      "title": "Memory Utilization",
       "type": "timeseries"
     },
     {
diff --git a/pkg/gofr/container/mock_container.go b/pkg/gofr/container/mock_container.go
index 418b937a..d3f79b09 100644
--- a/pkg/gofr/container/mock_container.go
+++ b/pkg/gofr/container/mock_container.go
@@ -54,7 +54,7 @@ func NewMockContainer(t *testing.T, options ...options) (*Container, *Mocks) {
 	ctrl := gomock.NewController(t)
 
 	mockDB, sqlMock, _ := sql.NewSQLMocks(t)
-	// initialisation of expectations
+	// initialization of expectations
 	expectation := expectedQuery{}
 
 	sqlMockWrapper := &mockSQL{sqlMock, &expectation}
@@ -132,7 +132,7 @@ func NewMockContainer(t *testing.T, options ...options) (*Container, *Mocks) {
 		Metrics:       mockMetrics,
 	}
 
-	// TODO: Remove this expectation from mock container (previous generalisation) to the actual tests where their expectations are being set.
+	// TODO: Remove this expectation from mock container (previous generalization) to the actual tests where their expectations are being set.
 	mockMetrics.EXPECT().RecordHistogram(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(),
 		gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes()
 
diff --git a/pkg/gofr/datasource/cassandra/cassandra_batch.go b/pkg/gofr/datasource/cassandra/cassandra_batch.go
index 651eadca..67b6c90f 100644
--- a/pkg/gofr/datasource/cassandra/cassandra_batch.go
+++ b/pkg/gofr/datasource/cassandra/cassandra_batch.go
@@ -28,7 +28,7 @@ func (c *Client) BatchQueryWithCtx(ctx context.Context, name, stmt string, value
 
 	b, ok := c.cassandra.batches[name]
 	if !ok {
-		return errBatchNotInitialised
+		return errBatchNotInitialized
 	}
 
 	b.Query(stmt, values...)
@@ -47,7 +47,7 @@ func (c *Client) ExecuteBatchWithCtx(ctx context.Context, name string) error {
 
 	b, ok := c.cassandra.batches[name]
 	if !ok {
-		return errBatchNotInitialised
+		return errBatchNotInitialized
 	}
 
 	return c.cassandra.session.executeBatch(b)
@@ -64,7 +64,7 @@ func (c *Client) ExecuteBatchCASWithCtx(ctx context.Context, name string, dest .
 
 	b, ok := c.cassandra.batches[name]
 	if !ok {
-		return false, errBatchNotInitialised
+		return false, errBatchNotInitialized
 	}
 
 	return c.cassandra.session.executeBatchCAS(b, dest...)
diff --git a/pkg/gofr/datasource/cassandra/errors.go b/pkg/gofr/datasource/cassandra/errors.go
index e27b676c..34ea484f 100644
--- a/pkg/gofr/datasource/cassandra/errors.go
+++ b/pkg/gofr/datasource/cassandra/errors.go
@@ -9,7 +9,7 @@ var (
 	errDestinationIsNotPointer = errors.New("destination is not pointer")
 	errUnexpectedMap           = errors.New("a map was not expected")
 	errUnsupportedBatchType    = errors.New("batch type not supported")
-	errBatchNotInitialised     = errors.New("batch not initialized")
+	errBatchNotInitialized     = errors.New("batch not initialized")
 )
 
 type errUnexpectedPointer struct {
diff --git a/pkg/gofr/datasource/opentsdb/response.go b/pkg/gofr/datasource/opentsdb/response.go
index 6867638b..fe43d0a3 100644
--- a/pkg/gofr/datasource/opentsdb/response.go
+++ b/pkg/gofr/datasource/opentsdb/response.go
@@ -246,9 +246,9 @@ func (c *Client) sendRequest(ctx context.Context, method, url, reqBodyCnt string
 	if parser == nil {
 		// Use the default JSON unmarshaller if no custom parser is provided.
 		if err = json.Unmarshal(jsonBytes, parsedResp); err != nil {
-			errUnmarshaling := fmt.Errorf("failed to unmarshal response body for %s %s: %w", method, url, err)
+			errUnmarshalling := fmt.Errorf("failed to unmarshal response body for %s %s: %w", method, url, err)
 
-			return errUnmarshaling
+			return errUnmarshalling
 		}
 	} else {
 		// Use the custom parser if available.
diff --git a/pkg/gofr/datasource/scylladb/errors.go b/pkg/gofr/datasource/scylladb/errors.go
index 92626a83..77747eb1 100644
--- a/pkg/gofr/datasource/scylladb/errors.go
+++ b/pkg/gofr/datasource/scylladb/errors.go
@@ -8,7 +8,7 @@ import (
 var (
 	errUnsupportedBatchType    = errors.New("batch type not supported")
 	errDestinationIsNotPointer = errors.New("destination is not pointer")
-	errBatchNotInitialised     = errors.New("batch not initialized")
+	errBatchNotInitialized     = errors.New("batch not initialized")
 	errUnexpectedMap           = errors.New("a map was not expected")
 )
 
diff --git a/pkg/gofr/datasource/scylladb/scylladb.go b/pkg/gofr/datasource/scylladb/scylladb.go
index 60151aed..b60ca23a 100644
--- a/pkg/gofr/datasource/scylladb/scylladb.go
+++ b/pkg/gofr/datasource/scylladb/scylladb.go
@@ -262,7 +262,7 @@ func (c *Client) BatchQueryWithCtx(ctx context.Context, name, stmt string, value
 
 	b, ok := c.scylla.batches[name]
 	if !ok {
-		return errBatchNotInitialised
+		return errBatchNotInitialized
 	}
 
 	b.Query(stmt, values...)
@@ -282,7 +282,7 @@ func (c *Client) ExecuteBatchWithCtx(ctx context.Context, name string) error {
 
 	b, ok := c.scylla.batches[name]
 	if !ok {
-		return errBatchNotInitialised
+		return errBatchNotInitialized
 	}
 
 	return c.scylla.session.executeBatch(b)
@@ -305,7 +305,7 @@ func (c *Client) ExecuteBatchCASWithCtx(ctx context.Context, name string, dest .
 
 	b, ok := c.scylla.batches[name]
 	if !ok {
-		return false, errBatchNotInitialised
+		return false, errBatchNotInitialized
 	}
 
 	return c.scylla.session.executeBatchCAS(b, dest...)
diff --git a/pkg/gofr/datasource/sql/db.go b/pkg/gofr/datasource/sql/db.go
index ff346e10..30e4656a 100644
--- a/pkg/gofr/datasource/sql/db.go
+++ b/pkg/gofr/datasource/sql/db.go
@@ -183,7 +183,7 @@ func (t *Tx) Rollback() error {
 }
 
 // Select runs a query with args and binds the result of the query to the data.
-// data should ba a point to a slice, struct or any type. Slice will return multiple
+// data should be a point to a slice, struct or any type. Slice will return multiple
 // objects whereas struct will return a single object.
 //
 // Example Usages:
@@ -292,7 +292,7 @@ func (*DB) rowsToStruct(rows *sql.Rows, vo reflect.Value) {
 		v = vo.Elem()
 	}
 
-	// Map fields and their indexes by normalised name
+	// Map fields and their indexes by normalized name
 	fieldNameIndex := map[string]int{}
 
 	for i := 0; i < v.Type().NumField(); i++ {
diff --git a/pkg/gofr/service/basic_auth.go b/pkg/gofr/service/basic_auth.go
index d1da0547..1f3ac4f7 100644
--- a/pkg/gofr/service/basic_auth.go
+++ b/pkg/gofr/service/basic_auth.go
@@ -26,97 +26,97 @@ type basicAuthProvider struct {
 	HTTP
 }
 
-func (ba *basicAuthProvider) addAuthorizationHeader(headers map[string]string) error {
-	decodedPassword, err := b64.StdEncoding.DecodeString(ba.password)
+func (bap *basicAuthProvider) addAuthorizationHeader(headers map[string]string) error {
+	decodedPassword, err := b64.StdEncoding.DecodeString(bap.password)
 	if err != nil {
 		return err
 	}
 
-	encodedAuth := b64.StdEncoding.EncodeToString([]byte(ba.userName + ":" + string(decodedPassword)))
+	encodedAuth := b64.StdEncoding.EncodeToString([]byte(bap.userName + ":" + string(decodedPassword)))
 
 	headers["Authorization"] = "basic " + encodedAuth
 
 	return nil
 }
 
-func (ba *basicAuthProvider) Get(ctx context.Context, path string, queryParams map[string]any) (*http.Response, error) {
-	return ba.GetWithHeaders(ctx, path, queryParams, nil)
+func (bap *basicAuthProvider) Get(ctx context.Context, path string, queryParams map[string]any) (*http.Response, error) {
+	return bap.GetWithHeaders(ctx, path, queryParams, nil)
 }
 
-func (ba *basicAuthProvider) GetWithHeaders(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) GetWithHeaders(ctx context.Context, path string, queryParams map[string]any,
 	headers map[string]string) (*http.Response, error) {
-	err := ba.populateHeaders(headers)
+	err := bap.populateHeaders(headers)
 	if err != nil {
 		return nil, err
 	}
 
-	return ba.HTTP.GetWithHeaders(ctx, path, queryParams, headers)
+	return bap.HTTP.GetWithHeaders(ctx, path, queryParams, headers)
 }
 
-func (ba *basicAuthProvider) Post(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) Post(ctx context.Context, path string, queryParams map[string]any,
 	body []byte) (*http.Response, error) {
-	return ba.PostWithHeaders(ctx, path, queryParams, body, nil)
+	return bap.PostWithHeaders(ctx, path, queryParams, body, nil)
 }
 
-func (ba *basicAuthProvider) PostWithHeaders(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) PostWithHeaders(ctx context.Context, path string, queryParams map[string]any,
 	body []byte, headers map[string]string) (*http.Response, error) {
-	err := ba.populateHeaders(headers)
+	err := bap.populateHeaders(headers)
 	if err != nil {
 		return nil, err
 	}
 
-	return ba.HTTP.PostWithHeaders(ctx, path, queryParams, body, headers)
+	return bap.HTTP.PostWithHeaders(ctx, path, queryParams, body, headers)
 }
 
-func (ba *basicAuthProvider) Put(ctx context.Context, api string, queryParams map[string]any, body []byte) (*http.Response, error) {
-	return ba.PutWithHeaders(ctx, api, queryParams, body, nil)
+func (bap *basicAuthProvider) Put(ctx context.Context, api string, queryParams map[string]any, body []byte) (*http.Response, error) {
+	return bap.PutWithHeaders(ctx, api, queryParams, body, nil)
 }
 
-func (ba *basicAuthProvider) PutWithHeaders(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) PutWithHeaders(ctx context.Context, path string, queryParams map[string]any,
 	body []byte, headers map[string]string) (*http.Response, error) {
-	err := ba.populateHeaders(headers)
+	err := bap.populateHeaders(headers)
 	if err != nil {
 		return nil, err
 	}
 
-	return ba.HTTP.PutWithHeaders(ctx, path, queryParams, body, headers)
+	return bap.HTTP.PutWithHeaders(ctx, path, queryParams, body, headers)
 }
 
-func (ba *basicAuthProvider) Patch(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) Patch(ctx context.Context, path string, queryParams map[string]any,
 	body []byte) (*http.Response, error) {
-	return ba.PatchWithHeaders(ctx, path, queryParams, body, nil)
+	return bap.PatchWithHeaders(ctx, path, queryParams, body, nil)
 }
 
-func (ba *basicAuthProvider) PatchWithHeaders(ctx context.Context, path string, queryParams map[string]any,
+func (bap *basicAuthProvider) PatchWithHeaders(ctx context.Context, path string, queryParams map[string]any,
 	body []byte, headers map[string]string) (*http.Response, error) {
-	err := ba.populateHeaders(headers)
+	err := bap.populateHeaders(headers)
 	if err != nil {
 		return nil, err
 	}
 
-	return ba.HTTP.PatchWithHeaders(ctx, path, queryParams, body, headers)
+	return bap.HTTP.PatchWithHeaders(ctx, path, queryParams, body, headers)
 }
 
-func (ba *basicAuthProvider) Delete(ctx context.Context, path string, body []byte) (*http.Response, error) {
-	return ba.DeleteWithHeaders(ctx, path, body, nil)
+func (bap *basicAuthProvider) Delete(ctx context.Context, path string, body []byte) (*http.Response, error) {
+	return bap.DeleteWithHeaders(ctx, path, body, nil)
 }
 
-func (ba *basicAuthProvider) DeleteWithHeaders(ctx context.Context, path string, body []byte,
+func (bap *basicAuthProvider) DeleteWithHeaders(ctx context.Context, path string, body []byte,
 	headers map[string]string) (*http.Response, error) {
-	err := ba.populateHeaders(headers)
+	err := bap.populateHeaders(headers)
 	if err != nil {
 		return nil, err
 	}
 
-	return ba.HTTP.DeleteWithHeaders(ctx, path, body, headers)
+	return bap.HTTP.DeleteWithHeaders(ctx, path, body, headers)
 }
 
-func (ba *basicAuthProvider) populateHeaders(headers map[string]string) error {
+func (bap *basicAuthProvider) populateHeaders(headers map[string]string) error {
 	if headers == nil {
 		headers = make(map[string]string)
 	}
 
-	err := ba.addAuthorizationHeader(headers)
+	err := bap.addAuthorizationHeader(headers)
 	if err != nil {
 		return err
 	}
diff --git a/typos.toml b/typos.toml
new file mode 100644
index 00000000..5cce56f1
--- /dev/null
+++ b/typos.toml
@@ -0,0 +1,31 @@
+[default]
+locale = "en-us"
+extend-ignore-re=[
+	# UID and equivalent
+	"[A-Za-z0-9=_-]{30,}",
+
+	# False positive managements with inline comments
+	#
+	# disable spellchecker for current line with a comment mentioning "spellchecker:disable-line"
+	"(?Rm)^.*(<!--|#|//)\\s*spellchecker:disable-line(-->|\n)?$",
+	# disable a block from a "spellchecker:on" comment to "spellchecker:off" one
+  	"(?s)(<!--|#|//)\\s*spellchecker:off\\s*([^-\n]*-->|[^\n]*\n).*?(<!--|#|//)\\s*spellchecker:on",
+]
+
+# List of words that are ignored
+# Please add a comment about why they are ignored
+[default.extend-words]
+#ba = "ba"       		# short variable name
+datas = "datas" 		# common errors on datum/data plural, but too many to fix
+mosquitto = "mosquitto" # this is a MQQT broker
+IIT = "IIT" 			# Indian Institute of Technology
+# WARNING: Before adding new words here
+# Consider false-positive managements with inline comments as mentioned above
+
+[files]
+# excluded file
+extend-exclude = [
+	"go.sum","go.mod", # go.sum and go.mod contains URLs with hash, they can provide false positive
+	"vendor",          # not my dragon
+	"pkg/gofr/static/swagger*",
+	]



Test patch:
diff --git a/pkg/gofr/container/container_test.go b/pkg/gofr/container/container_test.go
index 4cc282e2..de7612ad 100644
--- a/pkg/gofr/container/container_test.go
+++ b/pkg/gofr/container/container_test.go
@@ -29,7 +29,7 @@ func Test_newContainerSuccessWithLogger(t *testing.T) {
 
 	container := NewContainer(cfg)
 
-	assert.NotNil(t, container.Logger, "TEST, Failed.\nlogger initialisation")
+	assert.NotNil(t, container.Logger, "TEST, Failed.\nlogger initialization")
 }
 
 func Test_newContainerDBInitializationFail(t *testing.T) {
diff --git a/pkg/gofr/datasource/cassandra/cassandra_batch_test.go b/pkg/gofr/datasource/cassandra/cassandra_batch_test.go
index acaebdbf..56cb5221 100644
--- a/pkg/gofr/datasource/cassandra/cassandra_batch_test.go
+++ b/pkg/gofr/datasource/cassandra/cassandra_batch_test.go
@@ -25,7 +25,7 @@ func Test_BatchQuery(t *testing.T) {
 		}, nil},
 		{"batch is not initialized", func() {
 			client.cassandra.batches = nil
-		}, errBatchNotInitialised},
+		}, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
@@ -53,7 +53,7 @@ func Test_ExecuteBatch(t *testing.T) {
 		}, errMock},
 		{"batch not initialized", func() {
 			client.cassandra.batches = nil
-		}, errBatchNotInitialised},
+		}, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
@@ -123,7 +123,7 @@ func Test_ExecuteBatchCAS(t *testing.T) {
 		}, &mockStructSlice, assert.AnError},
 		{"failure case: batch not initialized", &mockStructSlice, func() {
 			client.cassandra.batches = nil
-		}, &mockStructSlice, errBatchNotInitialised},
+		}, &mockStructSlice, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
diff --git a/pkg/gofr/datasource/scylladb/erros_test.go b/pkg/gofr/datasource/scylladb/errors_test.go
similarity index 100%
rename from pkg/gofr/datasource/scylladb/erros_test.go
rename to pkg/gofr/datasource/scylladb/errors_test.go
diff --git a/pkg/gofr/datasource/scylladb/scylladb_test.go b/pkg/gofr/datasource/scylladb/scylladb_test.go
index 09629c50..ec4f8c70 100644
--- a/pkg/gofr/datasource/scylladb/scylladb_test.go
+++ b/pkg/gofr/datasource/scylladb/scylladb_test.go
@@ -315,7 +315,7 @@ func Test_BatchQuery(t *testing.T) {
 		{"batch is not initialized", func() {
 			mockDeps.mockLogger.EXPECT().Debug(gomock.AssignableToTypeOf(&QueryLog{}))
 			client.scylla.batches = nil
-		}, errBatchNotInitialised},
+		}, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
@@ -355,7 +355,7 @@ func Test_ExecuteBatchCAS(t *testing.T) {
 		{"failure case: batch not initialized", &mockStructSlice, func() {
 			mockDeps.mockLogger.EXPECT().Debug(gomock.AssignableToTypeOf(&QueryLog{}))
 			client.scylla.batches = nil
-		}, &mockStructSlice, errBatchNotInitialised},
+		}, &mockStructSlice, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
@@ -458,7 +458,7 @@ func TestClient_ExecuteBatchCASWithCtx(t *testing.T) {
 				mockDeps.mockSession.EXPECT().executeBatch(mockDeps.mockBatch).Return(nil).Times(1)
 			},
 			expRes: &mockStructSlice,
-			expErr: errBatchNotInitialised,
+			expErr: errBatchNotInitialized,
 		},
 		{
 			desc:      "failure case: executeBatch returns error",
@@ -469,7 +469,7 @@ func TestClient_ExecuteBatchCASWithCtx(t *testing.T) {
 				mockDeps.mockSession.EXPECT().executeBatch(mockDeps.mockBatch).Return(assert.AnError).Times(1)
 			},
 			expRes: &mockStructSlice,
-			expErr: errBatchNotInitialised,
+			expErr: errBatchNotInitialized,
 		},
 		{
 			desc:      "failure case: batch not initialized",
@@ -480,7 +480,7 @@ func TestClient_ExecuteBatchCASWithCtx(t *testing.T) {
 				client.scylla.batches = nil
 			},
 			expRes: &mockStructSlice,
-			expErr: errBatchNotInitialised,
+			expErr: errBatchNotInitialized,
 		},
 	}
 
@@ -513,7 +513,7 @@ func Test_ExecuteBatch(t *testing.T) {
 		{"batch not initialized", func() {
 			mockDeps.mockLogger.EXPECT().Debug(gomock.AssignableToTypeOf(&QueryLog{}))
 			client.scylla.batches = nil
-		}, errBatchNotInitialised},
+		}, errBatchNotInitialized},
 	}
 
 	for i, tc := range testCases {
diff --git a/pkg/gofr/http/middleware/oauth_test.go b/pkg/gofr/http/middleware/oauth_test.go
index 1a81cb3f..4e33ecc5 100644
--- a/pkg/gofr/http/middleware/oauth_test.go
+++ b/pkg/gofr/http/middleware/oauth_test.go
@@ -40,7 +40,7 @@ func TestGetJwtClaims(t *testing.T) {
 	claims := []byte(`{"aud":"stage.kops.dev","iat":1257894000,"orig":"GOOGLE",` +
 		`"picture":"https://lh3.googleusercontent.com/a/ACg8ocKJ5DDA4zruzFlsQ9KvL` +
 		`jHDtbOT_hpVz0hEO8jSl2m7Myk=s96-c","sub":"rakshit.singh@zopsmart.com","sub-id"` +
-		`:"a6573e1d-abea-4863-acdb-6cf3626a4414","typ":"refresh_token"}`)
+		`:"a6573e1d-abea-4863-acdb-6cf3626a4414","type":"refresh_token"}`)
 
 	router := mux.NewRouter()
 	router.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
diff --git a/pkg/gofr/http/multipart_file_bind_test.go b/pkg/gofr/http/multipart_file_bind_test.go
index 7b89b2d5..7992e06c 100644
--- a/pkg/gofr/http/multipart_file_bind_test.go
+++ b/pkg/gofr/http/multipart_file_bind_test.go
@@ -105,9 +105,9 @@ func TestSetFieldValue_InvalidKinds(t *testing.T) {
 	uf := &formData{}
 
 	tests := []struct {
-		kind reflect.Kind
-		data string
-		typ  reflect.Type
+		kind     reflect.Kind
+		data     string
+		destType reflect.Type
 	}{
 		{reflect.Complex64, "foo", reflect.TypeOf(complex64(0))},
 		{reflect.Complex128, "bar", reflect.TypeOf(complex128(0))},
@@ -118,7 +118,7 @@ func TestSetFieldValue_InvalidKinds(t *testing.T) {
 	}
 
 	for _, tt := range tests {
-		value := reflect.New(tt.typ).Elem()
+		value := reflect.New(tt.destType).Elem()
 		ok, err := uf.setFieldValue(value, tt.data)
 
 		require.False(t, ok, "expected false, got true for kind %v", tt.kind)
@@ -187,8 +187,10 @@ func TestSetStructValue_Success(t *testing.T) {
 			wantField2: 456,
 		},
 		{
-			name:       "Mixed Case and invalid field names",
-			data:       `{"FielD1":"value4", "invalidField":"ignored", "FiEld2":789}`,
+			name: "Mixed Case and invalid field names",
+			// spellchecker:off # using field with case sensitive variations would be reported as a typo otherwise
+			data: `{"FielD1":"value4", "invalidField":"ignored", "FiEld2":789}`,
+			// spellchecker:on
 			wantField1: "value4",
 			wantField2: 789,
 		},
diff --git a/pkg/gofr/migration/migration_test.go b/pkg/gofr/migration/migration_test.go
index 2530afcb..178f7ca8 100644
--- a/pkg/gofr/migration/migration_test.go
+++ b/pkg/gofr/migration/migration_test.go
@@ -47,14 +47,14 @@ func TestMigration_NoDatasource(t *testing.T) {
 func Test_getMigratorDBInitialisation(t *testing.T) {
 	cntnr, _ := container.NewMockContainer(t)
 
-	datasource, _, isInitialised := getMigrator(cntnr)
+	datasource, _, isInitialized := getMigrator(cntnr)
 
 	assert.NotNil(t, datasource.SQL, "TEST Failed \nSQL not initialized, but should have been initialized")
 	assert.NotNil(t, datasource.Redis, "TEST Failed \nRedis not initialized, but should have been initialized")
-	assert.True(t, isInitialised, "TEST Failed \nNo datastores are Initialized")
+	assert.True(t, isInitialized, "TEST Failed \nNo datastores are Initialized")
 }
 
-func initialiseClickHouseRunMocks(t *testing.T) (*MockClickhouse, *container.Container) {
+func initializeClickHouseRunMocks(t *testing.T) (*MockClickhouse, *container.Container) {
 	t.Helper()
 
 	mockClickHouse := NewMockClickhouse(gomock.NewController(t))
@@ -89,7 +89,7 @@ func TestMigrationRunClickhouseSuccess(t *testing.T) {
 			}},
 		}
 
-		mockClickHouse, mockContainer := initialiseClickHouseRunMocks(t)
+		mockClickHouse, mockContainer := initializeClickHouseRunMocks(t)
 
 		mockClickHouse.EXPECT().Exec(gomock.Any(), CheckAndCreateChMigrationTable).Return(nil)
 		mockClickHouse.EXPECT().Select(gomock.Any(), gomock.Any(), getLastChGoFrMigration).Return(nil)
@@ -106,7 +106,7 @@ func TestMigrationRunClickhouseSuccess(t *testing.T) {
 
 func TestMigrationRunClickhouseMigrationFailure(t *testing.T) {
 	logs := testutil.StderrOutputForFunc(func() {
-		mockClickHouse, mockContainer := initialiseClickHouseRunMocks(t)
+		mockClickHouse, mockContainer := initializeClickHouseRunMocks(t)
 
 		migrationMap := map[int64]Migrate{
 			1: {UP: func(d Datasource) error {
@@ -132,7 +132,7 @@ func TestMigrationRunClickhouseMigrationFailure(t *testing.T) {
 }
 
 func TestMigrationRunClickhouseMigrationFailureWhileCheckingTable(t *testing.T) {
-	mockClickHouse, mockContainer := initialiseClickHouseRunMocks(t)
+	mockClickHouse, mockContainer := initializeClickHouseRunMocks(t)
 
 	testutil.StderrOutputForFunc(func() {
 		migrationMap := map[int64]Migrate{
@@ -167,7 +167,7 @@ func TestMigrationRunClickhouseCurrentMigrationEqualLastMigration(t *testing.T)
 			}},
 		}
 
-		mockClickHouse, mockContainer := initialiseClickHouseRunMocks(t)
+		mockClickHouse, mockContainer := initializeClickHouseRunMocks(t)
 
 		mockClickHouse.EXPECT().Exec(gomock.Any(), CheckAndCreateChMigrationTable).Return(nil)
 		mockClickHouse.EXPECT().Select(gomock.Any(), gomock.Any(), getLastChGoFrMigration).Return(nil)
@@ -191,7 +191,7 @@ func TestMigrationRunClickhouseCommitError(t *testing.T) {
 			}},
 		}
 
-		mockClickHouse, mockContainer := initialiseClickHouseRunMocks(t)
+		mockClickHouse, mockContainer := initializeClickHouseRunMocks(t)
 
 		mockClickHouse.EXPECT().Exec(gomock.Any(), CheckAndCreateChMigrationTable).Return(nil)
 		mockClickHouse.EXPECT().Select(gomock.Any(), gomock.Any(), getLastChGoFrMigration).Return(nil)
diff --git a/pkg/gofr/service/basic_auth_test.go b/pkg/gofr/service/basic_auth_test.go
index 1e17d188..379cce00 100644
--- a/pkg/gofr/service/basic_auth_test.go
+++ b/pkg/gofr/service/basic_auth_test.go
@@ -201,10 +201,10 @@ func checkAuthHeaders(t *testing.T, r *http.Request) {
 }
 
 func Test_addAuthorizationHeader_Error(t *testing.T) {
-	ba := &basicAuthProvider{password: "invalid_password"}
+	bap := &basicAuthProvider{password: "invalid_password"}
 
 	headers := make(map[string]string)
-	err := ba.addAuthorizationHeader(headers)
+	err := bap.addAuthorizationHeader(headers)
 
 	if err == nil {
 		t.Error("Expected error, got nil")