Showing 1,401 of 1,401 total issues
Function runCommand
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const runCommand = async function (command, options) {
try {
// migrate Truffle data to the new location if necessary
const configMigration = require("./config-migration");
await configMigration.migrateTruffleDataIfNecessary();
Function network
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
network: function () {
var network_id = this.network_id;
if (network_id == null) {
var error =
Function interpretBlockhashedMulticall
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async interpretBlockhashedMulticall(
decoding: Codec.CalldataDecoding,
transaction: DecoderTypes.Transaction,
additionalContexts: Contexts.Contexts = {},
additionalAllocations?: {
Function invoke
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async invoke(operation) {
const method = await this.detectMethod(operation);
const { action } = method;
switch (action) {
Function decodeLogWithAdditionalOptions
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async decodeLogWithAdditionalOptions(
log: DecoderTypes.Log,
options: DecoderTypes.EventOptions = {},
additionalContexts: Contexts.Contexts = {}
): Promise<LogDecoding[]> {
Function interpretDeadlinedMulticall
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async interpretDeadlinedMulticall(
decoding: Codec.CalldataDecoding,
transaction: DecoderTypes.Transaction,
additionalContexts: Contexts.Contexts = {},
additionalAllocations?: {
Function reverseEnsResolve
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async reverseEnsResolve(address: string): Promise<Uint8Array | null> {
debug("reverse resolving %s", address);
if (this.ens === null) {
debug("no ens set up!");
return null;
Function recognizeDecimal
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private recognizeDecimal(input: unknown): Codec.DecimalWrapResponse {
if (Utils.isBigNumber(input)) {
if (input.isFinite()) {
return {
kind: "decimal" as const,
Function unbox
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
unbox: async (
url: string,
destination: string,
options: unboxOptions = {},
config: any
Function includeBlocks
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async includeBlocks<
Block extends DataModel.Block | Omit<DataModel.Block, "hash">
>(options: {
blocks: (Block | undefined)[];
settings?: IncludeSettings;
Function find
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
*find<N extends CollectionName<C>>(
collectionName: N,
ids: string[],
document: graphql.DocumentNode
): Process<C, Resource<C, N>[]> {
Function generateMapping
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function generateMapping() {
const promises = [];
// Dequeue all the known paths, generating resolver promises,
// We'll add paths if we discover external package imports.
Function concretize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const concretize = <C extends Collections, N extends AdapterName>(
options: AttachOptions<N> = {}
): ConcretizeResult<C, N> => {
const { adapter: { name, settings } = { name: "indexeddb" } } = options;
Function configure
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const configure: Configure = <B extends Batch>(options: Options<B>) => {
return function* <I extends Input<B>, O extends Output<B>>(
inputs: Inputs<B, I>
): Process<Collections, Outputs<B, O>> {
const {
Function list
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async list(index = 0) {
if (index >= this.config.compilerRoots!.length) {
throw new Error(
`Failed to fetch the list of Solidity compilers from the following ` +
`sources: ${this.config.compilerRoots}. Make sure you are connected ` +
Function preserve
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function* preserve(
options: PreserveOptions
): AsyncIterable<Event> {
const { request, recipes } = options;
const { recipe } = request;
Similar blocks of code found in 2 locations. Consider refactoring. Open
stack: createLeaf(
[evm.next.state.stack],
words => (words || []).map(word => Codec.Conversion.toBytes(word))
),
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 59.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
module.exports = {
command: "install",
description:
"ethpm has moved on faster than truffle's integration. " +
"\n This feature has been broken for some time, so we've disabled it. " +
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 59.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
stack: createLeaf(
[evm.current.state.stack],
words => (words || []).map(word => Codec.Conversion.toBytes(word))
),
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 59.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
module.exports = {
command: "publish",
description:
"ethpm has moved on faster than truffle's integration. " +
"\n This feature has been broken for some time, so we've disabled it. " +
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 59.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76