Skip to content

Different dotnet tool run jb cleanupcode results locally and on appveyor #1104

Closed
@ThomasBarnekow

Description

@ThomasBarnekow

DESCRIPTION

The results of the following build tool are much different on my local machine and the appveyor build server:

dotnet tool run jb cleanupcode "JsonApiDotNetCore.sln"  --include=";src/JsonApiDotNetCore/Configuration/NoSqlServiceCollectionExtensions.cs;src/JsonApiDotNetCore/Queries/INoSqlQueryLayerComposer.cs;src/JsonApiDotNetCore/Queries/NoSqlQueryLayerComposer.cs;src/JsonApiDotNetCore/Resources/Annotations/NoSqlHasForeignKeyAttribute.cs;src/JsonApiDotNetCore/Resources/Annotations/NoSqlOwnsManyAttribute.cs;src/JsonApiDotNetCore/Resources/Annotations/NoSqlResourceAttribute.cs;src/JsonApiDotNetCore/Services/NoSqlResourceService.cs" --profile --profile="JADNC Full Cleanup" --properties:Configuration=Release --verbosity=WARN -dsl=GlobalAll -dsl=SolutionPersonal -dsl=ProjectPersonal

On the build server, the expected formatting is this:

public NoSqlResourceService(IResourceRepositoryAccessor repositoryAccessor, IQueryLayerComposer sqlQueryLayerComposer,
    IPaginationContext paginationContext, IJsonApiOptions options, ILoggerFactory loggerFactory, IJsonApiRequest request,
    IResourceChangeTracker<TResource> resourceChangeTracker, IResourceDefinitionAccessor resourceDefinitionAccessor,
    INoSqlQueryLayerComposer queryLayerComposer, IResourceGraph resourceGraph, IEvaluatedIncludeCache evaluatedIncludeCache)
{
    // Further details omitted.
}

When run locally on my machine, the above code is reformatted as follows (which is in line with what it looked like before and what was rejected by the build server):

public NoSqlResourceService(
    IResourceRepositoryAccessor repositoryAccessor,
    IQueryLayerComposer sqlQueryLayerComposer,
    IPaginationContext paginationContext,
    IJsonApiOptions options,
    ILoggerFactory loggerFactory,
    IJsonApiRequest request,
    IResourceChangeTracker<TResource> resourceChangeTracker,
    IResourceDefinitionAccessor resourceDefinitionAccessor,
    INoSqlQueryLayerComposer queryLayerComposer,
    IResourceGraph resourceGraph,
    IEvaluatedIncludeCache evaluatedIncludeCache)
{
    // Further details omitted.
}

This has lead to build failures in #1103.

STEPS TO REPRODUCE

Run the above command line on those or other files.

EXPECTED BEHAVIOR

Both locally and on appveyor, the expected code format is identical. When using ReSharper in Visual Studio, the code cleanup creates the expected code format.

If I had a choice, the second format (which is produced by ReSharper using the "JADNC Full Cleanup" on my local machine but unfortunately rejected on appveyor) is the expected format.

ACTUAL BEHAVIOR

When run locally and on appveyor, the above command produces different results, leading to unexpected build failures.

VERSIONS USED

  • JsonApiDotNetCore version: nosql-resource-service branch off of master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions