qa/spelling: Add Codespell support (#1121)

* Add codespell support

* Fix paths

* Add HTML files to exclusion list
This commit is contained in:
Adrian Gallagher
2023-01-30 12:36:56 +11:00
committed by GitHub
parent c785ae73a7
commit a79e0d2b3e
108 changed files with 359 additions and 318 deletions

View File

@@ -583,7 +583,7 @@ func (c *Config) CheckPairConsistency(exchName string) error {
atLeastOneEnabled = true
}
// If no pair is enabled across the entire range of assets, then atleast
// If no pair is enabled across the entire range of assets, then at least
// enable one and turn on the asset type
if !atLeastOneEnabled {
avail, err := c.GetAvailablePairs(exchName, assetTypes[0])
@@ -661,7 +661,7 @@ func (c *Config) GetPairFormat(exchName string, assetType asset.Item) (currency.
return *p.ConfigFormat, nil
}
// GetAvailablePairs returns a list of currency pairs for a specifc exchange
// GetAvailablePairs returns a list of currency pairs for a specific exchange
func (c *Config) GetAvailablePairs(exchName string, assetType asset.Item) (currency.Pairs, error) {
exchCfg, err := c.GetExchangeConfig(exchName)
if err != nil {
@@ -685,7 +685,7 @@ func (c *Config) GetAvailablePairs(exchName string, assetType asset.Item) (curre
return pairs.Format(pairFormat), nil
}
// GetEnabledPairs returns a list of currency pairs for a specifc exchange
// GetEnabledPairs returns a list of currency pairs for a specific exchange
func (c *Config) GetEnabledPairs(exchName string, assetType asset.Item) (currency.Pairs, error) {
exchCfg, err := c.GetExchangeConfig(exchName)
if err != nil {
@@ -755,7 +755,7 @@ func (c *Config) GetAllExchangeConfigs() []Exchange {
return configs
}
// GetExchangeConfig returns exchange configurations by its indivdual name
// GetExchangeConfig returns exchange configurations by its individual name
func (c *Config) GetExchangeConfig(name string) (*Exchange, error) {
m.Lock()
defer m.Unlock()
@@ -780,7 +780,7 @@ func (c *Config) UpdateExchangeConfig(e *Exchange) error {
return fmt.Errorf("%s %w", e.Name, ErrExchangeNotFound)
}
// CheckExchangeConfigValues returns configuation values for all enabled
// CheckExchangeConfigValues returns configuration values for all enabled
// exchanges
func (c *Config) CheckExchangeConfigValues() error {
if len(c.Exchanges) == 0 {

View File

@@ -812,7 +812,7 @@ func TestCheckPairConsistency(t *testing.T) {
}
if len(c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled) != 1 {
t.Fatal("there should be atleast one pair located in this list")
t.Fatal("there should be at least one pair located in this list")
}
if !c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled[0].Equal(p1) {
@@ -840,7 +840,7 @@ func TestCheckPairConsistency(t *testing.T) {
}
if len(c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled) != 1 {
t.Fatal("should be populated with atleast one currency pair")
t.Fatal("should be populated with at least one currency pair")
}
// Test that an invalid enabled pair is removed from the list
@@ -861,7 +861,7 @@ func TestCheckPairConsistency(t *testing.T) {
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(true)
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{}
// Test no conflict and atleast one on enabled asset type
// Test no conflict and at least one on enabled asset type
if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
t.Error("unexpected result")
}
@@ -869,7 +869,7 @@ func TestCheckPairConsistency(t *testing.T) {
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(true)
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{currency.NewPair(currency.DASH, currency.USD)}
// Test with conflict and atleast one on enabled asset type
// Test with conflict and at least one on enabled asset type
if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
t.Error("unexpected result")
}
@@ -877,7 +877,7 @@ func TestCheckPairConsistency(t *testing.T) {
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].AssetEnabled = convert.BoolPtr(false)
c.Exchanges[0].CurrencyPairs.Pairs[asset.Spot].Enabled = currency.Pairs{}
// Test no conflict and atleast one on disabled asset type
// Test no conflict and at least one on disabled asset type
if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
t.Error("unexpected result")
}
@@ -888,7 +888,7 @@ func TestCheckPairConsistency(t *testing.T) {
p2,
}
// Test with conflict and atleast one on disabled asset type
// Test with conflict and at least one on disabled asset type
if err := c.CheckPairConsistency(testFakeExchangeName); err != nil {
t.Error("unexpected result")
}