Showing 124 of 297 total issues
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor(
securityMockProvider: SecurityMockProvider,
securitiesMockProvider: SecuritiesMockProvider,
$qMockProvider: QMockProvider,
) {
Method to_ledger_json
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def to_ledger_json(trx)
{
id: trx['id'],
transaction_type: trx['transaction_type'],
transaction_date: trx['transaction_date'],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor(
payeeMockProvider: PayeeMockProvider,
payeesMockProvider: PayeesMockProvider,
$qMockProvider: QMockProvider,
) {
Function contextChanged
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private contextChanged(transaction: Transaction): boolean {
let currentContext: Entity | null | undefined;
// Check if the transaction still matches the context
switch (this.contextType) {
Function categories
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public categories(
filter: string,
limit: number,
parent?: Category | null,
includeSplits = false,
Function categories
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public categories(
filter: string,
limit: number,
parent?: Category | null,
includeSplits = false,
Function useLastTransaction
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private useLastTransaction(
transaction?: Partial<ScheduledTransaction>,
): void {
if (undefined === transaction) {
return;
Function getValuesFrom
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getValuesFrom(row: JQuery<HTMLTableRowElement>): Transaction {
const subcategoryOrAccountName = row.find(
transactionSubcategoryOrAccountName,
),
creditAmount = row.find(transactionCreditAmount),
Function promptToSwitchAccounts
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private promptToSwitchAccounts(
message: string,
transaction: SplitTransactionChild | Transaction,
): void {
// Disable navigation on the table
Function populateFormWith
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function populateFormWith(transaction: TransactionEdit): void {
const {
rawTransactionDate,
payeeName,
securityName,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public constructor(
$sce: angular.ISCEService,
transactionModel: TransactionModel,
accountModel: AccountModel,
ogModalErrorService: OgModalErrorService,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function useLastTransaction
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private useLastTransaction(transaction?: Partial<Transaction>): void {
if (undefined === transaction) {
return;
}
Function link
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
link(
scope: OgInputCurrencyScope,
iElement: JQuery<Element>,
_: angular.IAttributes,
ngModel: angular.INgModelController,
Function getSubtransactions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private getSubtransactions(
transaction?: Transaction,
): angular.IPromise<SplitTransaction> | Transaction | undefined {
if (undefined === transaction) {
return undefined;
Function constructor
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public constructor(
$scope: angular.IScope,
$transitions: angular.ui.IStateParamsService,
private readonly $uibModal: angular.ui.bootstrap.IModalService,
private readonly $timeout: angular.ITimeoutService,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function checkRowMatches
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function checkRowMatches(
expectedValues: Transaction | TransactionEdit,
): void {
const {
transactionDate,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method update_from_json
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update_from_json(json)
original_account_type = account_type
self.name = json['name']
self.account_type = json['account_type']
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getValuesFrom
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function getValuesFrom(row: JQuery<HTMLTableRowElement>): Transaction {
const subcategoryOrAccountName = row.find(
transactionSubcategoryOrAccountName,
),
creditAmount = row.find(transactionCreditAmount),
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function editSecurity
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public editSecurity(index?: number): void {
// Helper function to sort by security current holding and name
function byHoldingAndName(a: Security, b: Security): number {
let x: boolean, y: boolean;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getTransactions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public getTransactions(
direction: TransactionFetchDirection,
fromDate?: Date,
transactionIdToFocus?: number,
): void {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"