Skip to content

Conversation

@anatol-sialitski
Copy link
Contributor

save changes

@anatol-sialitski anatol-sialitski linked an issue Nov 4, 2025 that may be closed by this pull request
InputTypeProperty.create( "listTitleExpression", "${data.val1} ${missing} ${data.val1} ${displayName}" )
.build() )
.build() )
.schemaConfig( GenericValue.object().put( "listTitleExpression", "${data.val1} ${missing} ${data.val1} ${displayName}" ).build() )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 142).

The issue identified by the Checkstyle linter is that the line of code exceeds the maximum allowed length of 140 characters, which can reduce readability and maintainability. To resolve this, we can break the long line into two shorter lines while ensuring that the code remains functional and clear.

Here's the suggested single line change to fix the issue:

Suggested change
.schemaConfig( GenericValue.object().put( "listTitleExpression", "${data.val1} ${missing} ${data.val1} ${displayName}" ).build() )
.schemaConfig( GenericValue.object().put( "listTitleExpression", "${data.val1} ${missing} ${data.val1} ${displayName}" )

This change wraps the method call in a way that allows it to fit within the character limit without altering the logic of the code.


This comment was generated by an experimental AI tool.

final CmsDescriptor cmsDescriptor = CmsDescriptor.create().applicationKey( ApplicationKey.from( "myapplication" ) )
.mixinMappings( MixinMappings.from(
MixinMapping.create().mixinName( descriptor.getName() ).allowContentTypes( "app:testContentType" ).optional( true ).build(),
MixinMapping.create().mixinName( descriptor.getName() ).allowContentTypes( "app:testContentType" ).optional( false ).build() ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 144).

The issue identified by the Checkstyle linter is that the line exceeds the maximum allowed length of 140 characters, which can make the code harder to read and maintain. To resolve this, we can break the line into multiple lines while ensuring that the code remains clear and properly formatted.

Here’s a code suggestion that addresses the issue by breaking the line into a more manageable length:

                MixinMapping.create().mixinName(descriptor.getName())
                    .allowContentTypes("app:testContentType")
                    .optional(false)
                    .build() ) )

This change maintains the functionality of the code while adhering to the style guidelines.


This comment was generated by an experimental AI tool.

inputTypeProperty( InputTypeProperty.create( "option", "label1" ).attribute( "value", "value1" ).build() ).
inputTypeProperty( InputTypeProperty.create( "option", "label2" ).attribute( "value", "value2" ).build() ).
build() ).
addFormItem( Input.create().name( "myTextLine" ).label( "myTextLine" ).inputType( InputTypeName.TEXT_LINE ).build() ).addFormItem(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 142).

The issue identified by the Checkstyle linter is that the line exceeds the maximum allowed length of 140 characters, which can make the code harder to read and maintain. To resolve this, we can break the line into two or more lines to adhere to the coding style guidelines.

Here's a code suggestion that addresses the issue by breaking the line after the first addFormItem call:

            addFormItem( Input.create().name( "myTextLine" ).label( "myTextLine" ).inputType( InputTypeName.TEXT_LINE ).build() )
                .addFormItem(

This change ensures that the line length is within the acceptable limit while maintaining the readability of the code.


This comment was generated by an experimental AI tool.

.flatMap( ContentTypes::stream )
.filter( Predicate.not( ContentType::isAbstract ) )
.filter( type -> type.getSchemaConfig().getValue( "allowNewContent", Boolean.class, Boolean.TRUE ) ) )
.filter( type -> type.getSchemaConfig().optional( "allowNewContent").map( GenericValue::asBoolean ).orElse( Boolean.TRUE ) ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 142).

The issue identified by the Checkstyle linter is that the line in question exceeds the maximum allowed length of 140 characters, which can hinder readability and maintainability of the code.

To resolve this issue, we can break the line into two parts by moving the closing parenthesis of the filter method to a new line. This keeps the line length within the specified limit while maintaining the logical structure of the code.

Here's the suggested change:

Suggested change
.filter( type -> type.getSchemaConfig().optional( "allowNewContent").map( GenericValue::asBoolean ).orElse( Boolean.TRUE ) ) )
.filter( type -> type.getSchemaConfig().optional( "allowNewContent").map( GenericValue::asBoolean ).orElse( Boolean.TRUE ))

This comment was generated by an experimental AI tool.

build();
final SiteDescriptor siteDescriptor =
SiteDescriptor.create().mappingDescriptors( ControllerMappingDescriptors.from( mapingDescriptor ) ).build();
SiteDescriptor.create().applicationKey( ApplicationKey.from( "myapplication" ) ).mappingDescriptors( ControllerMappingDescriptors.from( mapingDescriptor ) ).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 177).

The issue reported by the Checkstyle linter indicates that the line exceeds the maximum allowed length of 140 characters, which can impact readability and maintainability of the code. To resolve this, we can break the line into multiple lines while ensuring that the code remains clear and functional.

Here's a single line change that addresses the issue by breaking the line into two parts:

            SiteDescriptor.create().applicationKey(ApplicationKey.from("myapplication"))
                .mappingDescriptors(ControllerMappingDescriptors.from(mapingDescriptor)).build();

This comment was generated by an experimental AI tool.


final GenericValue config = GenericValue.object().put( "option", GenericValue.list().add(
GenericValue.object().put( "value", "notTranslatedValue" ).put( "label", GenericValue.object().put( "i18n",
"translate.option" ).build() ).build() ).build() ).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 171).

The issue identified by the Checkstyle linter is that the line exceeds the maximum allowed length of 140 characters, making it less readable and harder to maintain. Long lines can be difficult to navigate and may not fit well in standard code editors, which can lead to poor readability.

To resolve this issue, we can break the long line into multiple lines for better readability while keeping the code functional. Here's a suggested change that maintains the original logic but adheres to the line length constraint:

                                                                                                                            GenericValue.object().put( "value", "notTranslatedValue" )
                                                                                                                                .put( "label", GenericValue.object().put( "i18n", "translate.option" ).build() ).build() ).build();

This change breaks the line at a logical point, making it more manageable and ensuring it stays within the character limit.


This comment was generated by an experimental AI tool.

build();
final SiteDescriptor siteDescriptor =
SiteDescriptor.create().mappingDescriptors( ControllerMappingDescriptors.from( mapingDescriptor ) ).build();
SiteDescriptor.create().applicationKey( ApplicationKey.from( "myapplication" ) ).mappingDescriptors( ControllerMappingDescriptors.from( mapingDescriptor ) ).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 177).

The issue reported by the Checkstyle linter is that the line of code exceeds the maximum allowed length of 140 characters, which can make it difficult to read and maintain. To resolve this, we can break the line into two parts by moving the method call mappingDescriptors(...) to a new line, while ensuring proper indentation for clarity.

Here's the suggested change:

            SiteDescriptor.create().applicationKey( ApplicationKey.from( "myapplication" ) )
                .mappingDescriptors( ControllerMappingDescriptors.from( mapingDescriptor ) ).build();

This comment was generated by an experimental AI tool.

final Site site = createSite( SiteConfigs.from( siteConfig ) );

final SiteDescriptor siteDescriptor = SiteDescriptor.create().mappingDescriptors( ControllerMappingDescriptors.empty() ).build();
final SiteDescriptor siteDescriptor = SiteDescriptor.create().applicationKey( ApplicationKey.from( "myapplication" ) ).mappingDescriptors( ControllerMappingDescriptors.empty() ).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 194).

The issue reported by the Checkstyle linter is that the line where siteDescriptor is being created exceeds the maximum allowed length of 140 characters, which makes the code less readable and harder to maintain. To resolve this, we can break the line into multiple lines while ensuring that it remains clear and follows the coding conventions.

Here’s a suggested change that keeps the method calls aligned and improves readability without exceeding the character limit:

        final SiteDescriptor siteDescriptor = SiteDescriptor.create()
            .applicationKey(ApplicationKey.from("myapplication"))
            .mappingDescriptors(ControllerMappingDescriptors.empty())
            .build();

This comment was generated by an experimental AI tool.


String result =
request().path( "cms/default/content/schema/xdata/getContentXData" ).queryParam( "contentId", "contentId" ).get().getAsString();
request().path( "cms/default/content/schema/mixins/getContentMixins" ).queryParam( "contentId", "contentId" ).get().getAsString();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 142).

The issue identified by the Checkstyle linter is that the line of code exceeds the maximum allowed length of 140 characters, which can make the code harder to read and maintain. To resolve this, we can break the line into two parts, while still keeping it as a single logical statement.

Here’s a code suggestion to fix the issue:

            String result = request().path("cms/default/content/schema/mixins/getContentMixins")
                                    .queryParam("contentId", "contentId").get().getAsString();

This comment was generated by an experimental AI tool.

.setLocaleMessageResolver(
new LocaleMessageResolver( localeService, xData.xdata().getName().getApplicationKey(), request.getLocales() ) )
.setInlineMixinResolver( new InlineMixinResolver( mixinService ) ).setOptional( xData.optional() )
new LocaleMessageResolver( localeService, mixinOption.mixinDescriptor().getName().getApplicationKey(), request.getLocales() ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Codacy found a minor CodeStyle issue: Line is longer than 140 characters (found 147).

The issue identified by the Checkstyle linter is that the line in question exceeds the maximum allowed length of 140 characters, which can affect readability and maintainability of the code.

To resolve this, we can break the line into two separate lines while ensuring that the code remains clear and functional. The suggestion will involve adding a line break after the new LocaleMessageResolver( constructor call.

Here's the code suggestion:

                    new LocaleMessageResolver(localeService, mixinOption.mixinDescriptor().getName().getApplicationKey(), 
                        request.getLocales()) )

This comment was generated by an experimental AI tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply the latest XP 8 changes

2 participants