-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #142 Configure golang-ci and run it in Travis builds #165
Merged
stdevMac
merged 23 commits into
fibercrypto:develop
from
simelo:stdevHan_t142_make_lint
Oct 16, 2019
Merged
Fixes #142 Configure golang-ci and run it in Travis builds #165
stdevMac
merged 23 commits into
fibercrypto:develop
from
simelo:stdevHan_t142_make_lint
Oct 16, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@stdevHan will review asap |
# src needs separate linting rules golangci-lint run -c .golangci.yml ./src/... src/coin/skycoin/models/wallet.go:530:24: `neccesary` is a misspelling of `necessary` (misspell) //Checking if all the neccesary addresses exists ^ src/main/config.go:96: G104: Errors unhandled. (gosec) jsonFormat, _ := json.Marshal(cm.getConfigManagerJson()) src/main/config.go:171: G304: Potential file inclusion via variable (gosec) dat, err := ioutil.ReadFile(fileDir) src/main/config.go:199: G104: Errors unhandled. (gosec) jsonFormat, _ := json.Marshal(cm.getConfigManagerJson()) src/main/config.go:201: G104: Errors unhandled. (gosec) os.MkdirAll(filepath.Dir(getConfigFileDir()), 0755) src/coin/skycoin/models/account.go:198:6: ineffectual assignment to `err` (ineffassign) bl, err := getBalanceOfAddresses(outs, addrs) ^ src/coin/skycoin/models/wallet.go:744:7: ineffectual assignment to `err` (ineffassign) pwd, err := password("Insert Password") ^ src/models/qtransaction.go:78:13: ineffectual assignment to `err` (ineffassign) quotient, err := util.AltcoinQuotient("SKY") ^ src/models/walletsManager.go:493:2: ineffectual assignment to `accuracy` (ineffassign) accuracy, _ = util.AltcoinQuotient(skycoin.SkycoinTicker) ^ src/coin/skycoin/models/account.go:22:34: Error return value of `(github.com/fibercrypto/FiberCryptoWallet/src/core.MultiPool).Return` is not checked (errcheck) defer core.GetMultiPool().Return(PoolSection, c) ^ src/coin/skycoin/models/account.go:46:34: Error return value of `(github.com/fibercrypto/FiberCryptoWallet/src/core.MultiPool).Return` is not checked (errcheck) defer core.GetMultiPool().Return(PoolSection, c) ^ src/coin/skycoin/models/account.go:77:34: Error return value of `(github.com/fibercrypto/FiberCryptoWallet/src/core.MultiPool).Return` is not checked (errcheck) defer core.GetMultiPool().Return(PoolSection, c) ^ src/models/address/address.go:73:47: invalid operation: al (variable of type *AddressList) has no field or method Addresses (typecheck) if !index.IsValid() || index.Row() >= len(al.Addresses()) { ^ src/models/address/address.go:77:16: invalid operation: al (variable of type *AddressList) has no field or method Addresses (typecheck) address := al.Addresses()[index.Row()] ^ src/models/address/address.go:68:5: invalid operation: al (variable of type *AddressList) has no field or method SetAddresses (typecheck) al.SetAddresses(append(al.Addresses()[:index], al.Addresses()[index+1:]...)) ^ src/models/history/historyManager.go:57:48: invalid operation: a[i] (variable of type *github.com/fibercrypto/FiberCryptoWallet/src/models/transactions.TransactionDetails) has no field or method Date (typecheck) d1, _ := time.Parse(dateTimeFormatForGo, a[i].Date().ToString(dateTimeFormatForQML)) ^ src/models/history/historyManager.go:58:48: invalid operation: a[j] (variable of type *github.com/fibercrypto/FiberCryptoWallet/src/models/transactions.TransactionDetails) has no field or method Date (typecheck) d2, _ := time.Parse(dateTimeFormatForGo, a[j].Date().ToString(dateTimeFormatForQML)) ^ src/models/history/historyManager.go:101:30: NewTransactionDetails not declared by package transactions (typecheck) txnDetails := transactions.NewTransactionDetails(nil) ^ src/models/history/history.go:137:54: invalid operation: hm (variable of type *TransactionList) has no field or method Transactions (typecheck) hm.BeginRemoveRows(core.NewQModelIndex(), 0, len(hm.Transactions())-1) ^ src/models/history/history.go:138:5: invalid operation: hm (variable of type *TransactionList) has no field or method SetTransactions (typecheck) hm.SetTransactions(make([]*transactions.TransactionDetails, 0)) ^ src/models/history/history.go:72:47: invalid operation: hm (variable of type *TransactionList) has no field or method Transactions (typecheck) if !index.IsValid() || index.Row() >= len(hm.Transactions()) { ^ src/models/pending/PendingModel.go:91:8: undeclared name: NewPendingTransaction (typecheck) pt := NewPendingTransaction(nil) ^ src/models/pending/PendingModel.go:82:13: invalid operation: ptModel (variable of type *PendingTransaction) has no field or method SetMine (typecheck) ptModel.SetMine(1) ^ src/models/pending/PendingModel.go:87:4: invalid operation: m (variable of type *PendingTransactionList) has no field or method SetTransactions (typecheck) m.SetTransactions(ptModels) ^ src/models/pending/Pending.go:4:2: undeclared name: PendingTransactionList_QmlRegisterType2 (typecheck) PendingTransactionList_QmlRegisterType2("PendingModels", 1, 0, "QPendingList") ^ src/models/pending/Pending.go:5:2: undeclared name: PendingTransaction_QmlRegisterType2 (typecheck) PendingTransaction_QmlRegisterType2("PendingModels", 1, 0, "QPendingTransaction") ^ src/models/transactions/transactions.go:9:2: undeclared name: TransactionDetails_QmlRegisterType2 (typecheck) TransactionDetails_QmlRegisterType2("HistoryModels", 1, 0, "QTransactionDetail") ^ src/models/walletsModel.go:156:4: invalid operation: m (variable of type *WalletModel) has no field or method SetWallets (typecheck) m.SetWallets(wallets) ^ src/models/walletsModel.go:159:4: invalid operation: m (variable of type *WalletModel) has no field or method SetCount (typecheck) m.SetCount(len(m.Wallets())) ^ src/models/walletsModel.go:145:4: invalid operation: m (variable of type *WalletModel) has no field or method SetWallets (typecheck) m.SetWallets(append(m.Wallets()[:row], m.Wallets()[row+1:]...)) ^ src/models/walletsManager.go:471:13: undeclared name: NewQWallet (typecheck) qWallet := NewQWallet(nil) ^ src/models/qtransaction.go:22:10: undeclared name: NewQTransaction (typecheck) qtxn := NewQTransaction(nil) ^ src/models/qtransaction.go:25:20: NewAddressList not declared by package address (typecheck) inputs := address.NewAddressList(nil) ^ src/models/qtransaction.go:26:21: NewAddressList not declared by package address (typecheck) outputs := address.NewAddressList(nil) ^ src/models/networkingModel.go:160:7: undeclared name: NewQNetworking (typecheck) q := NewQNetworking(nil) ^ src/models/networkingModel.go:156:11: invalid operation: netModel (variable of type *NetworkingModel) has no field or method SetCount (typecheck) netModel.SetCount(len(netModel.Networks())) ^ src/models/networkingModel.go:149:11: invalid operation: netModel (variable of type *NetworkingModel) has no field or method SetNetworks (typecheck) netModel.SetNetworks(append(netModel.Networks()[:row], netModel.Networks()[row+1:]...)) ^ src/models/networkingManager.go:17:6: invalid operation: net (variable of type *NetworkingManager) has no field or method ConnectGetNetworks (typecheck) net.ConnectGetNetworks(net.getNetworks) ^ src/models/networking.go:4:2: undeclared name: NetworkingModel_QmlRegisterType2 (typecheck) NetworkingModel_QmlRegisterType2("NetworkingManager", 1, 0, "NetworkingModel") ^ src/models/networking.go:5:2: undeclared name: QNetworking_QmlRegisterType2 (typecheck) QNetworking_QmlRegisterType2("NetworkingManager", 1, 0, "QNetworking") ^ src/models/networking.go:6:2: undeclared name: NetworkingManager_QmlRegisterType2 (typecheck) NetworkingManager_QmlRegisterType2("NetworkingManager", 1, 0, "NetworkManager") ^ src/models/modelsManager.go:33:15: undeclared name: NewAddressesModel (typecheck) addrModel = NewAddressesModel(nil) ^ src/models/modelsManager.go:19:5: invalid operation: mm (variable of type *ModelManager) has no field or method ConnectSetWalletManager (typecheck) mm.ConnectSetWalletManager(mm.setWalletManager) ^ src/models/modelsManager.go:20:5: invalid operation: mm (variable of type *ModelManager) has no field or method ConnectGetAddressModel (typecheck) mm.ConnectGetAddressModel(mm.getAddressModel) ^ src/models/walletsManager.go:439:15: undeclared name: NewQAddress (typecheck) qAddress := NewQAddress(nil) ^ src/models/walletsManager.go:232:12: undeclared name: NewQOutput (typecheck) qout := NewQOutput(nil) ^ src/models/models.go:4:2: undeclared name: BlockchainStatusModel_QmlRegisterType2 (typecheck) BlockchainStatusModel_QmlRegisterType2("BlockchainModels", 1, 0, "BlockchainStatusModel") ^ src/models/models.go:5:2: undeclared name: WalletModel_QmlRegisterType2 (typecheck) WalletModel_QmlRegisterType2("WalletsManager", 1, 0, "WalletModel") ^ src/models/models.go:6:2: undeclared name: QWallet_QmlRegisterType2 (typecheck) QWallet_QmlRegisterType2("WalletsManager", 1, 0, "QWallet") ^ src/models/modelWallets.go:144:4: invalid operation: m (variable of type *ModelWallets) has no field or method SetAddresses (typecheck) m.SetAddresses(ma) ^ src/models/modelWallets.go:145:21: invalid operation: m (variable of type *ModelWallets) has no field or method Addresses (typecheck) m.insertRows(len(m.Addresses()), len(ma)) ^ src/models/modelWallets.go:103:9: undeclared name: NewModelAddresses (typecheck) ma := NewModelAddresses(nil) ^ src/models/modelAddresses.go:78:4: invalid operation: m (variable of type *ModelAddresses) has no field or method SetOutputs (typecheck) m.SetOutputs(mo) ^ src/models/modelAddresses.go:79:21: invalid operation: m (variable of type *ModelAddresses) has no field or method Outputs (typecheck) m.insertRows(len(m.Outputs()), len(mo)) ^ src/models/modelAddresses.go:49:26: invalid operation: m (variable of type *ModelAddresses) has no field or method Outputs (typecheck) if index.Row() >= len(m.Outputs()) { ^ src/models/modelOutputs.go:156:4: invalid operation: m (variable of type *ModelOutputs) has no field or method SetOutputs (typecheck) m.SetOutputs(make([]*QOutput, 0)) ^ src/models/modelOutputs.go:150:4: invalid operation: m (variable of type *ModelOutputs) has no field or method SetOutputs (typecheck) m.SetOutputs(mo) ^ src/models/modelOutputs.go:143:49: invalid operation: m (variable of type *ModelOutputs) has no field or method Outputs (typecheck) m.BeginInsertRows(core.NewQModelIndex(), len(m.Outputs()), len(m.Outputs())+len(mo)-1) ^ src/models/config.go:72:19: undeclared name: NewWalletSource (typecheck) newWltSource := NewWalletSource(nil) ^ src/models/config.go:31:5: invalid operation: cm (variable of type *ConfigManager) has no field or method ConnectGetSources (typecheck) cm.ConnectGetSources(cm.getSources) ^ src/models/config.go:32:5: invalid operation: cm (variable of type *ConfigManager) has no field or method ConnectGetNodeString (typecheck) cm.ConnectGetNodeString(cm.getNodeString) ^ src/models/blockchainModels.go:94:5: invalid operation: bs (variable of type *BlockchainStatusModel) has no field or method SetNumberOfBlocks (typecheck) bs.SetNumberOfBlocks(strconv.FormatUint(numberOfBlocks, 10)) ^ src/coin/skycoin/models/blockchain.go:78:2: `lastTimeStatusRequested` is unused (structcheck) lastTimeStatusRequested uint64 ^ src/coin/skycoin/models/account.go:14: File is not `goimports`-ed (goimports) ) src/coin/skycoin/models/coin.go:8: File is not `goimports`-ed (goimports) "github.com/skycoin/skycoin/src/cipher" src/coin/skycoin/params/params.go:27: File is not `goimports`-ed (goimports) CalculatedHoursName = "Calculated Hours" Makefile:35: recipe for target 'lint' failed in Windows
…bercrypto/FiberCryptoWallet into stdevHan_t142_make_lint
…il` and `src/main`.
…ercrypto/FiberCryptoWallet into stdevHan_t142_make_lint Conflicts: src/coin/skycoin/models/coin.go src/coin/skycoin/models/network.go src/coin/skycoin/models/wallet.go src/core/network.go
… the installation of golangci in Win
olemis
approved these changes
Oct 15, 2019
stdevAlDen
reviewed
Oct 15, 2019
# from this option's value: | ||
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ | ||
skip-dirs: | ||
- /usr/local/go/src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stdevHan is possible to use a env var here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tried it before, I will review
olemis
requested changes
Oct 15, 2019
stdevMac
approved these changes
Oct 16, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #142
Changes:
golang-ci
and run it in Travis buildsDoes this change need to mentioned in CHANGELOG.md?
yes