-
Notifications
You must be signed in to change notification settings - Fork 580
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
feat(clients): use default values according to defaultsMode config #3192
Conversation
The server protocol tests are failing, because exclude config is not added. Error:
Earlier it was added in tsconfig.json, but we removed it because non-test clients do not emit tests. |
Exclude folder added in smithy-lang/smithy-typescript#496 |
<BugInstance type="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" priority="2" rank="16" abbrev="RV" category="BAD_PRACTICE" instanceHash="d6dcc21b80bd1963df0f310c65a7816b" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="253">
<ShortMessage>Method ignores exceptional return value</ShortMessage>
<LongMessage>Exceptional return value of java.io.File.createNewFile() ignored in software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[])</LongMessage>
<Class classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="61" end="107" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[lines 61-107]</Message>
</SourceLine>
<Message>In class software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator</Message>
</Class>
<Method classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" name="main" signature="([Ljava/lang/String;)V" isStatic="true" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="64" end="107" startBytecode="0" endBytecode="702" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java"/>
<Message>In method software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[])</Message>
</Method>
<Method classname="java.io.File" name="createNewFile" signature="()Z" isStatic="false" role="METHOD_CALLED">
<SourceLine classname="java.io.File" start="1030" end="1035" startBytecode="0" endBytecode="126" sourcefile="File.java" sourcepath="java/io/File.java"/>
<Message>Called method java.io.File.createNewFile()</Message>
</Method>
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true" start="105" end="105" startBytecode="330" endBytecode="330" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[line 105]</Message>
</SourceLine>
</BugInstance>
<BugInstance type="SBSC_USE_STRINGBUFFER_CONCATENATION" priority="2" rank="18" abbrev="SBSC" category="PERFORMANCE" instanceHash="600649c208865b03b6881c487245470d" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Method concatenates strings using + in a loop</ShortMessage>
<LongMessage>software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[]) concatenates strings using + in a loop</LongMessage>
<Class classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="61" end="107" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[lines 61-107]</Message>
</SourceLine>
<Message>In class software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator</Message>
</Class>
<Method classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" name="main" signature="([Ljava/lang/String;)V" isStatic="true" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="64" end="107" startBytecode="0" endBytecode="702" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java"/>
<Message>In method software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[])</Message>
</Method>
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true" start="96" end="96" startBytecode="195" endBytecode="195" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[line 96]</Message>
</SourceLine>
</BugInstance>
<BugInstance type="VA_FORMAT_STRING_USES_NEWLINE" priority="2" rank="20" abbrev="FS" category="BAD_PRACTICE" instanceHash="10ed42fac12d27a9e1ebaec5ee0aa0c4" instanceOccurrenceNum="0" instanceOccurrenceMax="0">
<ShortMessage>Format string should use %n rather than \n</ShortMessage>
<LongMessage>Format string should use %n rather than \n in software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[])</LongMessage>
<Class classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="61" end="107" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[lines 61-107]</Message>
</SourceLine>
<Message>In class software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator</Message>
</Class>
<Method classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" name="main" signature="([Ljava/lang/String;)V" isStatic="true" primary="true">
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" start="64" end="107" startBytecode="0" endBytecode="702" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java"/>
<Message>In method software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator.main(String[])</Message>
</Method>
<Method classname="java.lang.String" name="format" signature="(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;" isStatic="true" role="METHOD_CALLED">
<SourceLine classname="java.lang.String" start="2897" end="2897" startBytecode="0" endBytecode="67" sourcefile="String.java" sourcepath="java/lang/String.java"/>
<Message>Called method String.format(String, Object[])</Message>
</Method>
<String value="* `"%s"`: %s\n" role="STRING_FORMAT_STRING">
<Message>Format string "* `"%s"`: %s\n"</Message>
</String>
<SourceLine classname="software.amazon.smithy.aws.typescript.codegen.DefaultsModeConfigGenerator" primary="true" start="96" end="96" startBytecode="223" endBytecode="223" sourcefile="DefaultsModeConfigGenerator.java" sourcepath="software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java" relSourcepath="src/main/java/software/amazon/smithy/aws/typescript/codegen/DefaultsModeConfigGenerator.java">
<Message>At DefaultsModeConfigGenerator.java:[line 96]</Message>
</SourceLine>
</BugInstance> |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Description
What does this implement/fix? Explain your changes.
Testing
How was this change tested?
Additional context
Add any other context about the PR here.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.