Commit 0163a761 authored by Christopher Ferris's avatar Christopher Ferris
Browse files

FAB-3691 fix misspelled words caught by misspell



note that bddtests/regression/go/ote/ote.go is just
whitespace alignment affected by linter.
add check_spelling.sh
Add check_spelling to Makefile

Change-Id: I7029e1223abede0d05758a8b3d435be061824083
Signed-off-by: default avatarChristopher Ferris <chrisfer@us.ibm.com>
parent 154160eb
......@@ -95,7 +95,10 @@ include docker-env.mk
all: native docker checks
checks: linter license unit-test behave
checks: linter license spelling unit-test behave
spelling: buildenv
@scripts/check_spelling.sh
license: buildenv
@scripts/check_license.sh
......
......@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package pkcs11
import (
......@@ -31,7 +32,7 @@ import (
"github.com/hyperledger/fabric/bccsp/utils"
)
// fileBasedKeyStore is a folder-based KeyStore.
// FileBasedKeyStore is a folder-based KeyStore.
// Each key is stored in a separated file whose name contains the key's SKI
// and flags to identity the key's type. All the keys are stored in
// a folder whose path is provided at initialization time.
......
......@@ -1468,7 +1468,7 @@ func TestRSAKeyGenEphemeral(t *testing.T) {
t.Fatalf("Failed generating RSA corresponding public key [%s]", err)
}
if pk == nil {
t.Fatal("PK must be diffrent from nil")
t.Fatal("PK must be different from nil")
}
b, err := k.Bytes()
......
......@@ -1374,7 +1374,7 @@ func TestRSAKeyGenEphemeral(t *testing.T) {
t.Fatalf("Failed generating RSA corresponding public key [%s]", err)
}
if pk == nil {
t.Fatal("PK must be diffrent from nil")
t.Fatal("PK must be different from nil")
}
b, err := k.Bytes()
......
......@@ -208,11 +208,11 @@ func DERToPrivateKey(der []byte) (key interface{}, err error) {
// PEMtoPrivateKey unmarshals a pem to private key
func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error) {
if len(raw) == 0 {
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
return nil, errors.New("Invalid PEM. It must be different from nil.")
}
block, _ := pem.Decode(raw)
if block == nil {
return nil, fmt.Errorf("Failed decoding PEM. Block must be diffrent from nil. [% x]", raw)
return nil, fmt.Errorf("Failed decoding PEM. Block must be different from nil. [% x]", raw)
}
// TODO: derive from header the type of the key
......@@ -244,7 +244,7 @@ func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error) {
// PEMtoAES extracts from the PEM an AES key
func PEMtoAES(raw []byte, pwd []byte) ([]byte, error) {
if len(raw) == 0 {
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
return nil, errors.New("Invalid PEM. It must be different from nil.")
}
block, _ := pem.Decode(raw)
if block == nil {
......@@ -404,7 +404,7 @@ func PublicKeyToEncryptedPEM(publicKey interface{}, pwd []byte) ([]byte, error)
// PEMtoPublicKey unmarshals a pem to public key
func PEMtoPublicKey(raw []byte, pwd []byte) (interface{}, error) {
if len(raw) == 0 {
return nil, errors.New("Invalid PEM. It must be diffrent from nil.")
return nil, errors.New("Invalid PEM. It must be different from nil.")
}
block, _ := pem.Decode(raw)
if block == nil {
......@@ -439,7 +439,7 @@ func PEMtoPublicKey(raw []byte, pwd []byte) (interface{}, error) {
// DERToPublicKey unmarshals a der to public key
func DERToPublicKey(raw []byte) (pub interface{}, err error) {
if len(raw) == 0 {
return nil, errors.New("Invalid DER. It must be diffrent from nil.")
return nil, errors.New("Invalid DER. It must be different from nil.")
}
key, err := x509.ParsePKIXPublicKey(raw)
......
......@@ -316,7 +316,7 @@ func (b *BDDContext) userExpectsProposalResponsesWithStatusFromEndorsers(enrollI
var userRegistration *UserRegistration
var keyedProposalResponseMap KeyedProposalResponseMap
errRetFunc := func() error {
return fmt.Errorf("Error verifying proposal reponse '%s' for user '%s' with expected response code of '%s': %s", proposalResponseAlias, enrollID, respStatusCode, err)
return fmt.Errorf("Error verifying proposal response '%s' for user '%s' with expected response code of '%s': %s", proposalResponseAlias, enrollID, respStatusCode, err)
}
if userRegistration, err = b.GetUserRegistration(enrollID); err != nil {
return errRetFunc()
......
This diff is collapsed.
......@@ -54,7 +54,7 @@ func (bh *MSPConfigHandler) BeginConfig(tx interface{}) {
defer bh.pendingLock.Unlock()
_, ok := bh.pendingConfig[tx]
if ok {
panic("Programming error, called BeginConfig mulitply for the same tx")
panic("Programming error, called BeginConfig multiply for the same tx")
}
bh.pendingConfig[tx] = &mspConfigStore{
idMap: make(map[string]*pendingMSPConfig),
......@@ -74,7 +74,7 @@ func (bh *MSPConfigHandler) CommitProposals(tx interface{}) {
defer bh.pendingLock.Unlock()
pendingConfig, ok := bh.pendingConfig[tx]
if !ok {
panic("Programming error, called BeginConfig mulitply for the same tx")
panic("Programming error, called BeginConfig multiply for the same tx")
}
bh.MSPManager = pendingConfig.proposedMgr
......@@ -87,7 +87,7 @@ func (bh *MSPConfigHandler) ProposeMSP(tx interface{}, mspConfig *mspprotos.MSPC
pendingConfig, ok := bh.pendingConfig[tx]
bh.pendingLock.RUnlock()
if !ok {
panic("Programming error, called BeginConfig mulitply for the same tx")
panic("Programming error, called BeginConfig multiply for the same tx")
}
// check that the type for that MSP is supported
......
......@@ -48,7 +48,7 @@ func NewStandardValues(protosStructs ...interface{}) (*standardValues, error) {
}
// Deserialize looks up the backing Values proto of the given name, unmarshals the given bytes
// to populate the backing message structure, and retuns a referenced to the retained deserialized
// to populate the backing message structure, and returns a referenced to the retained deserialized
// message (or an error, either because the key did not exist, or there was an an error unmarshaling
func (sv *standardValues) Deserialize(key string, value []byte) (proto.Message, error) {
msg, ok := sv.lookup[key]
......@@ -95,7 +95,7 @@ func (sv *standardValues) initializeProtosStruct(objValue reflect.Value) error {
_, ok = sv.lookup[structField.Name]
if ok {
return fmt.Errorf("Ambiguous field name specified, multiple occurances of %s", structField.Name)
return fmt.Errorf("Ambiguous field name specified, multiple occurrences of %s", structField.Name)
}
sv.lookup[structField.Name] = proto
......
......@@ -28,7 +28,7 @@ const (
GroupPrefix = "[Groups] "
ValuePrefix = "[Values] "
PolicyPrefix = "[Policy] " // The plurarility doesn't match, but, it makes the logs much easier being the same lenght as "Groups" and "Values"
PolicyPrefix = "[Policy] " // The plurarility doesn't match, but, it makes the logs much easier being the same length as "Groups" and "Values"
PathSeparator = "/"
)
......
......@@ -38,7 +38,7 @@ const (
epoch = 0
)
// Template can be used to faciliate creation of config transactions
// Template can be used to facilitate creation of config transactions
type Template interface {
// Envelope returns a ConfigUpdateEnvelope for the given chainID
Envelope(chainID string) (*cb.ConfigUpdateEnvelope, error)
......
......@@ -155,7 +155,7 @@ func TestPolicyForItem(t *testing.T) {
ModPolicy: "rootPolicy",
},
})
assert.False(t, ok, "Should not have found rootPolicy off a non-existant manager")
assert.False(t, ok, "Should not have found rootPolicy off a non-existent manager")
policy, ok = cm.policyForItem(comparable{
path: []string{"root", "foo"},
......
......@@ -86,7 +86,7 @@ func testBlockIndexSync(t *testing.T, numBlocks int, numBlocksToIndex int, syncB
// Plug-in back the original index
blkfileMgr.index = origIndex
// The first set of blocks should be present in the orginal index
// The first set of blocks should be present in the original index
for i := 0; i < numBlocksToIndex; i++ {
block, err := blkfileMgr.retrieveBlockByNumber(uint64(i))
testutil.AssertNoError(t, err, fmt.Sprintf("block [%d] should have been present in the index", i))
......
......@@ -89,7 +89,7 @@ func ListSubdirs(dirPath string) ([]string, error) {
func logDirStatus(msg string, dirPath string) {
exists, _, err := FileExists(dirPath)
if err != nil {
logger.Errorf("Error while checking for dir existance")
logger.Errorf("Error while checking for dir existence")
}
if exists {
logger.Debugf("%s - [%s] exists", msg, dirPath)
......
......@@ -104,7 +104,7 @@ func TestListSubdirs(t *testing.T) {
}
func createAndWriteAFile(sentence string) (int, error) {
//create a file in the direcotry
//create a file in the directory
f, err2 := os.Create(dbFileTest)
if err2 != nil {
return 0, err2
......
......@@ -230,7 +230,7 @@ func (pm *ManagerImpl) BeginPolicyProposals(tx interface{}, groups []string) ([]
defer pm.pendingLock.Unlock()
pendingConfig, ok := pm.pendingConfig[tx]
if ok {
logger.Panicf("Serious Programming error: cannot call begin mulitply for the same proposal")
logger.Panicf("Serious Programming error: cannot call begin multiply for the same proposal")
}
pendingConfig = &policyConfig{
......
......@@ -66,7 +66,7 @@ func TestEnvSlice(t *testing.T) {
expected := []string{"a", "b", "c"}
if !reflect.DeepEqual(uconf.Inner.Slice, expected) {
t.Fatalf("Did not get back the right slice, expeced: %v got %v", expected, uconf.Inner.Slice)
t.Fatalf("Did not get back the right slice, expected: %v got %v", expected, uconf.Inner.Slice)
}
}
......@@ -119,7 +119,7 @@ func TestByteSize(t *testing.T) {
t.Fatalf("Failed to unmarshal with: %s", err)
}
if uconf.Inner.ByteSize != tc.expected {
t.Fatalf("Did not get back the right byte size, expeced: %v got %v", tc.expected, uconf.Inner.ByteSize)
t.Fatalf("Did not get back the right byte size, expected: %v got %v", tc.expected, uconf.Inner.ByteSize)
}
})
}
......
......@@ -80,7 +80,7 @@ type nextStateInfo struct {
sendSync bool
}
// Handler responsbile for management of Peer's side of chaincode stream
// Handler responsible for management of Peer's side of chaincode stream
type Handler struct {
sync.RWMutex
//peer to shim grpc serializer. User only in serialSend
......
......@@ -37,7 +37,7 @@ func init() {
}
// LedgerCommitter is the implementation of Committer interface
// it keeps the reference to the ledger to commit blocks and retreive
// it keeps the reference to the ledger to commit blocks and retrieve
// chain information
type LedgerCommitter struct {
ledger ledger.PeerLedger
......
......@@ -299,7 +299,7 @@ type ChaincodeData struct {
//Reset resets
func (cd *ChaincodeData) Reset() { *cd = ChaincodeData{} }
//String convers to string
//String converts to string
func (cd *ChaincodeData) String() string { return proto.CompactTextString(cd) }
//ProtoMessage just exists to make proto happy
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment