Skip to content

Commit

Permalink
FAB-3691 fix misspelled words caught by misspell
Browse files Browse the repository at this point in the history
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: Christopher Ferris <chrisfer@us.ibm.com>
  • Loading branch information
christo4ferris committed May 7, 2017
1 parent 154160e commit 0163a76
Show file tree
Hide file tree
Showing 54 changed files with 1,094 additions and 974 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bccsp/pkcs11/fileks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bccsp/pkcs11/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion bccsp/sw/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 5 additions & 5 deletions bccsp/utils/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bddtests/context_endorser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading

0 comments on commit 0163a76

Please sign in to comment.