PowerBuilder
PowerBuilder Code Rules
Category | Severity | Name | Description |
---|---|---|---|
Bug | Major | All branches in a conditional structure should not have exactly the same implementation |
The "All branches in a conditional structure should not have exactly the same implementation" PowerBuilder code rule states that all branches in a conditional structure should have distinct implementations. This means that each branch should have its own distinct logic and code, rather than having the same code repeated across multiple branches. This helps to ensure that the code is clear and easy to read, and that the logic of the code is sound and consistent. Additionally, it helps to avoid potential errors that could arise from having multiple branches with the same implementation. |
Vulnerability | Critical | Always use AES encryption algorithm in a secure mode |
The PowerBuilder code rule "Always use AES encryption algorithm in a secure mode" requires that developers use the Advanced Encryption Standard (AES) algorithm for all encryption operations. AES is a symmetric encryption algorithm that is considered to be one of the strongest and most reliable encryption algorithms available. When using AES encryption, it is important to always use a secure mode, such as Cipher Block Chaining (CBC) or Galois/Counter Mode (GCM). This ensures that the encrypted data is secure and not susceptible to attacks. |
Maintainability | Minor | Boolean checks should not be inverted |
The PowerBuilder code rule "Boolean checks should not be inverted" states that a Boolean check should not be written in a way that would cause it to evaluate to the opposite of what is intended. This means that when writing code, it is important to be aware of the logical structure of the code and ensure that any Boolean checks are written in the correct order. This will ensure that the code behaves as expected and does not produce unexpected results. |
Maintainability | Minor | Boolean literals should not be redundant |
The "Boolean literals should not be redundant" rule states that when writing PowerBuilder code, Boolean literals (true/false) should not be used redundantly. This means that if a Boolean value is already established, it should not be repeated unnecessarily. For example, if a Boolean value has already been set to "true," it should not be written again as "true" in the same code. |
Maintainability | Critical | Calling the Java class in PowerBuilder is no longer supported |
The rule states that "Calling the Java class in PowerBuilder is no longer supported in PowerBuilder 2022", this means that developers can no longer use these objects in their PowerBuilder 2022 applications, and any existing applications that were built with these objects will need to be updated to use other methods. o The EJBConnection, EJBTransaction, and JavaVM objects are no longer supported. Also The CreateJavaVM function is no longer supported. This change reflects the changing landscape of application development and the need for developers to use more modern methods and technologies. |
Maintainability | Major | CASE clauses should not have too many lines |
The "CASE clauses should not have too many lines" PowerBuilder code rule states that when writing code using the CASE statement, the number of lines within each clause should be kept to a minimum. This helps to improve the readability of the code, makes it easier to debug, and reduces the chances of introducing errors. Additionally, it is recommended that the CASE statement be used only when absolutely necessary, and that alternative approaches such as IF/ELSE statements be used instead when possible. This helps to keep the code concise and easier to maintain. |
Maintainability | Critical | CASE expressions should end with ELSE clauses |
The "CASE expressions should end with ELSE clauses" rule states that all CASE expressions used in PowerBuilder code should be concluded with an ELSE clause, regardless of whether the ELSE clause contains any code or not. This is done to ensure that all possible cases are accounted for in the CASE expression, and that the code is robust and reliable. Without an ELSE clause, a CASE expression may not be able to handle unexpected inputs or values, which can cause the code to fail or produce unexpected results. |
Maintainability | Minor | CASE should be used for sequences of simple tests |
The "CASE should be used for sequences of simple tests" PowerBuilder code rule states that the CASE statement should be used when there are multiple, simple tests that need to be performed, instead of using a series of IF statements. The CASE statement is more efficient and easier to read than multiple IF statements, as it allows for a single expression to be evaluated and compared against multiple values, with each value having its own corresponding action. It also allows for a default action to be taken if none of the values match the expression. |
Maintainability | Major | CASE structures should not have too many CASE clauses |
The "CASE structures should not have too many CASE clauses" rule states that when using CASE structures in PowerBuilder code, the number of CASE clauses should be kept to a manageable amount. This is because too many CASE clauses can make the code difficult to read and understand, and can also lead to performance issues. It's best to use other methods to structure the code if possible, such as using IF/ELSE statements. If CASE structures must be used, it's important to keep the number of clauses to a minimum. |
Maintainability | Minor | Code elements must not be unused |
This PowerBuilder code rule states that all code elements must not be unused. This means that all elements of the code, such as variables, functions, classes, and other code elements, must be used in the code in order to be considered valid. If a code element is unused, it should be removed from the code in order to make the code more efficient and reduce the risk of errors. Unused code elements can also create confusion for other developers, as they may not understand why the code element is there if it is not being used. It is important to ensure that all code elements are used appropriately in order to create clean, efficient code. |
Maintainability | Major | Collapsible if statements should be merged |
The "Collapsible if statements should be merged" rule states that when multiple if statements can be combined into a single if statement, they should be merged. This helps to make code more concise and easier to read, as well as reducing the overall complexity of the code. It also helps to avoid potential errors that can occur when multiple if statements are used. For example, if two if statements are used to check for a condition, but the first statement fails, the second statement will still be executed, even though the condition was already checked. By merging the two statements into one, this potential error can be avoided. |
Maintainability | Minor | Comments should not be located at the end of lines of code |
This rule states that comments should not be placed at the end of lines of code in PowerBuilder. This is because comments at the end of lines can be misinterpreted as part of the code, leading to potential errors. It is best to place comments on their own line, or at the beginning of the line of code, so that they are clearly separated from the code. |
Vulnerability | Critical | Cryptographic Hash Functions should not use SHA-1 or Message-Digest Algorithms |
This rule states that when using cryptographic hash functions, SHA-1 or Message-Digest Algorithms should not be used. Cryptographic hash functions are used to provide a secure way of verifying the integrity of data. SHA-1 and Message-Digest Algorithms are known to be vulnerable to attack, so it is important to use stronger algorithms to ensure the data is secure. |
Vulnerability | Critical | Database queries should not be vulnerable to injection attacks |
This PowerBuilder code rule states that database queries should be constructed in such a way that they are not vulnerable to injection attacks. An injection attack is a type of malicious attack in which malicious code is inserted into a query in order to gain access to or manipulate data. To prevent such attacks, code should be written to ensure that user input is sanitized and that queries are constructed properly so that malicious code is not able to be injected into them. |
Maintainability | Critical | DDE functions and events are Obsoleted |
The PowerBuilder code rule "DDE functions and events are Obsoleted" states that the use of Dynamic Data Exchange (DDE) functions and events should be avoided as they are no longer supported in new versions of PowerBuilder. Developers should use alternative methods for data exchange, such as OLE Automation or web services. |
Vulnerability | Critical | DES (Data Encryption Standard) or 3DES should not be used |
This rule states that the Data Encryption Standard (DES) or Triple DES (3DES) should not be used in PowerBuilder code. DES and 3DES are outdated encryption algorithms, and are considered to be weak and insecure. It is recommended to use more modern and secure algorithms such as AES or RSA for encryption. |
Vulnerability | Critical | Encryption algorithms must be used with the appropriate secure mode and padding scheme. |
This rule states that when using encryption algorithms, they must be used in conjunction with the appropriate secure mode and padding scheme in order to ensure the security of the data being encrypted. |
Vulnerability | Critical | Encryption keys should be long enough |
The rule "Encryption keys should be long enough" states that encryption keys used to protect sensitive data should be of a sufficient length to provide an adequate level of security. The longer the key, the more secure the data will be. Generally, the longer the key, the more difficult it is for an attacker to guess or crack the key. It is important to use strong encryption keys that are at least 128 bits long to ensure that the data is sufficiently protected. |
Vulnerability | Critical | Encryption keys should not be hardcoded |
The PowerBuilder code rule "Encryption keys should not be hardcoded" states that any encryption keys used in PowerBuilder code should not be stored as plain text in the code. Instead, the encryption keys should be stored in a secure location outside of the code and referenced from there. This ensures that the encryption keys are kept secure and not exposed to potential attackers who may be able to access the code. It also makes it easier to manage the keys in the event that they need to be changed or updated. |
Maintainability | Minor | EXIT should not be used in loops |
The EXIT should not be used in loops rule states that the EXIT statement should not be used to exit from a loop. Instead, the loop should be exited by using the appropriate looping construct, such as the EXIT WHEN or EXIT FOR statements. This rule ensures that code is properly structured and that loops are exited in a predictable and consistent manner. |
Maintainability | Minor | Fields should not have public accessibility |
This rule states that fields in PowerBuilder code should not be made publicly accessible. This means that they should not be declared as public variables, and should instead be declared as private or protected variables. This is important because making fields publicly accessible could open up the code to potential security risks, as it would allow external code to access and modify the fields without any restrictions. It is also important to ensure that fields are only accessible by code that is within the same class, as this will help to ensure that the code is secure and that it is only modified in the intended way. |
Maintainability | Major | Files should not have too many lines of code |
This rule states that files should not contain too many lines of code. This is to ensure that the code is well-structured, easy to read and maintain, and that the code is logically organized. It is also important to ensure that the code is not overly complicated or difficult to understand. This rule is especially important for larger projects, where the code can become difficult to manage if it is too long or convoluted. It is also important to keep the code organized in a way that is easy to understand and navigate. By limiting the length of each file, developers can ensure that their code is well-structured and easy to maintain. |
Maintainability | Major | FOR loop end conditions should not be hard - coded |
This rule states that the end conditions of a FOR loop should not be hard-coded. This means that the end conditions should be determined dynamically based on the data being processed by the loop. Hard-coding end conditions can lead to errors and inefficiencies in the code. It is better to use variables or other expressions to set the end conditions so that the loop can be more flexible and adaptable to different data sets. |
Maintainability | Critical | Forward prototype should not contains duplicate function declarations |
The "Forward Prototype Should Not Contain Duplicate Function Declarations" rule states that PowerBuilder code should not contain multiple declarations of the same function within a single forward prototype. This rule is intended to ensure that the code is organized and readable, and that the same function is not declared multiple times in the same forward prototype. If the same function is declared multiple times in the same forward prototype, it can lead to confusion and errors in the code. This rule also helps to ensure that the code is easy to maintain and debug. |
Maintainability | Major | Function and Event parameters should comply with a naming convention |
This PowerBuilder code rule states that function and event parameters must follow a specific naming convention. This convention helps to ensure that the code is consistent and easier to read. The naming convention should include a prefix for each type of parameter, such as “in_” for input parameters, “out_” for output parameters, and “inout_” for parameters that are both input and output. This makes it easier to identify the purpose of each parameter when reading the code. |
Maintainability | Major | Function OR Event name should comply with a naming convention |
This rule states that all functions and events in PowerBuilder code should follow a specific naming convention. This naming convention should be consistent throughout the code and should be easy to understand. The naming convention should also make it easy to distinguish between functions and events, as well as other types of code elements. This will help to make the code more organized and easier to read and maintain. |
Bug | Major | Function return type does not match with the actual variable returned |
This rule states that a function's return type must match the type of the variable that is actually returned. For example, if a function is declared as returning an integer, then the function must return an integer value. If a function is declared as returning a string, then the function must return a string value. If the actual return value does not match the declared return type, then the code will not compile. |
Maintainability | Major | Functions Or Events should not have too many parameters |
This rule states that functions or events should not have too many parameters. Having too many parameters can make the code difficult to read and understand, and can lead to errors. It is best practice to limit the number of parameters to a manageable number, usually no more than 5-10. Any more than that should be split into multiple functions or events. This will help make the code more readable and easier to maintain. |
Bug | Critical | Functions should end with RETURN statements |
The PowerBuilder code rule that states "Functions should end with RETURN statements" means that all functions should include a RETURN statement as the last line of code. This statement is used to indicate the end of the function and to return a value to the calling program. By using RETURN statements, code can be written in a more organized and efficient manner, as well as making it easier for other developers to understand and debug the code. |
Maintainability | Minor | Generic exceptions should not be ignored |
The "Generic exceptions should not be ignored" rule for PowerBuilder code states that all exceptions should be handled appropriately, and not just ignored. This means that a developer should not simply ignore an exception that occurs in the code, but instead should take the time to investigate the cause of the exception and handle it in the appropriate manner. This could include using a try-catch block, logging the exception, or simply displaying an error message to the user. Ignoring an exception can lead to errors or unexpected results in the application, so it is important to always handle exceptions appropriately. |
Maintainability | Critical | GOTO should not be used to jump backwards |
The "GOTO should not be used to jump backwards" PowerBuilder code rule states that the GOTO statement should not be used to jump backwards to a previous line of code. This is because it can create confusion and make debugging difficult. Instead, the code should be restructured to use loops, functions, and other control statements to make the code easier to read and understand. |
Maintainability | Major | GOTO should not be used within loops |
The PowerBuilder code rule stating that "GOTO should not be used within loops" is an important guideline for developers to adhere to when writing code. This rule is designed to prevent unexpected behavior and to make the code easier to read and maintain. By avoiding the use of GOTO statements within loops, developers can ensure that their code is more organized, less prone to errors, and easier to debug. Additionally, using GOTO statements within loops can lead to unexpected behavior, which can be difficult to diagnose and fix. Therefore, it is important to avoid the use of GOTO statements within loops in order to ensure code maintainability and reliability. |
Maintainability | Major | GOTO statements should not be used |
The "GOTO statements should not be used" PowerBuilder code rule states that GOTO statements should not be used in PowerBuilder code, as they can lead to code that is difficult to read and maintain. GOTO statements cause code to become "spaghetti code" - code that is difficult to follow and understand. Instead of using GOTO statements, it is better to use structured programming techniques such as looping and branching. These techniques make code easier to read and maintain, and can help to reduce errors in the code. |
Maintainability | Critical | IF ... ELSEIF constructs should end with ELSE clauses |
This rule states that IF...ELSEIF constructs should always end with an ELSE clause. This means that any IF...ELSEIF construct should have an ELSE clause at the end, which will be executed if none of the other conditions in the IF...ELSEIF construct are met. This ensures that all possible conditions are accounted for and that no unintended behavior occurs. |
Bug | Major | IF statement conditions should not evaluate unconditionally to TRUE or to FALSE |
The IF statement conditions should not evaluate unconditionally to TRUE or to FALSE rule is a guideline for PowerBuilder developers to ensure that their code is properly structured and functioning correctly. This rule states that IF statements should not contain conditions that will always evaluate to either TRUE or FALSE. Instead, the conditions should be dynamic and based on the values of variables or other conditions. This ensures that the IF statement will be executed correctly and that the desired results will be achieved. By following this rule, developers can avoid potential errors and maintain the integrity of their code. |
Maintainability | Major | IF statements should not be nested too deeply |
This rule states that IF statements should not be nested too deeply. This means that when writing code, the programmer should avoid writing nested IF statements that are too complex and difficult to read. Nested IF statements are when one IF statement is placed inside another IF statement. Too much nesting can make code hard to read and difficult to debug. To avoid this, the programmer should try to limit the amount of nesting and use other programming techniques to keep the code clear and readable. |
Vulnerability | Critical | IP addresses should not be Hardcoded |
The PowerBuilder code rule "IP addresses should not be Hardcoded" states that IP addresses should not be stored directly in the code, but should instead be stored in a configuration file. This allows the IP address to be changed without having to modify the code. This helps to ensure that the code is easier to maintain and allows for easier updates in the future. |
Bug | Major | Jump statements should not be followed by dead code |
The "Jump statements should not be followed by dead code" PowerBuilder code rule states that any jump statement (such as a "goto," "return," "exit," or "exit loop") should not be followed by code that will never be executed. This is considered bad programming practice, as it can lead to confusion and errors. It is best practice to ensure that any code following a jump statement is necessary and will be executed. |
Maintainability | Minor | Jump statements should not be redundant |
The "Jump statements should not be redundant" rule in PowerBuilder code states that jump statements, such as GOTO, EXIT, BREAK, and CONTINUE, should not be used unnecessarily. Unnecessary jump statements can make code harder to read and debug, as well as leading to unexpected behavior. When writing code, it is best to avoid redundant jump statements and use alternative control flow structures, such as loops and conditional statements, whenever possible. |
Maintainability | Minor | Lines should not be too long |
The rule "Lines should not be too long" states that PowerBuilder code should be written in a way that limits each line to a certain number of characters. This is to help improve readability of the code, as long lines can be difficult to read and understand. It also helps to keep the code organized and structured, as it can be easier to find errors or make changes when the code is written in a consistent manner. Additionally, long lines can cause performance issues, as the code may have to be parsed multiple times in order to be executed. |
Maintainability | Minor | Lines should not end with trailing whitespaces |
The PowerBuilder code rule "Lines should not end with trailing whitespaces" ensures that all lines of code in a program do not contain any unnecessary whitespace characters at the end of the line. This is important to maintain the readability and consistency of the code, as well as to prevent any potential errors that could be caused by the presence of these extra characters. |
Bug | Major | Loops with at most one iteration should be refactored |
The "Loops with at most one iteration should be refactored" rule in PowerBuilder code states that any loops which contain only one iteration of code should be refactored in order to make the code more efficient and easier to read. This means that instead of having a loop with just one iteration, the code should be rewritten to simply execute the code block without the loop. This can help to reduce the amount of code and make the code more understandable. |
Maintainability | Minor | Methods must not be empty |
This rule states that any methods created in PowerBuilder should not be empty. This means that each method should have some code within it that performs a specific task. This ensures that the code is well-structured, easy to read, and maintainable. Additionally, it prevents the code from becoming cluttered and difficult to debug. |
Maintainability | Minor | Missing destructor |
The Missing Destructor rule checks for PowerBuilder objects that are missing a destructor. A destructor is a method that is automatically called when an object is destroyed. It is used to free up any resources that the object has allocated, such as memory or file handles. If an object is missing a destructor, it can lead to memory leaks and other problems. This rule will generate a warning if an object is missing a destructor. |
Maintainability | Minor | Naming conventions must be applied |
The PowerBuilder code rule "Naming conventions must be applied" states that all objects, variables, and other elements of the code must be named according to the established naming conventions. This ensures that the code is consistent and easy to read, making it easier to understand and debug. It also helps to avoid confusion between different elements of the code. The naming conventions must be clearly defined and documented, and all developers must adhere to them. |
Vulnerability | Minor | Never use Console logging in production |
The rule "Never use Console logging in production" states that developers should never use Console logging when deploying their code to a production environment. Console logging is a debugging technique that allows developers to output information to the console window during code execution. While this can be useful for debugging purposes, it should not be used when the code is running in a production environment. This is because the information outputted to the console can be visible to users, which can lead to security and privacy issues. Additionally, the output from the console can also slow down the performance of the application, which can lead to an overall decrease in user experience. Therefore, it is best to avoid using Console logging in production environments. |
Vulnerability | Critical | Never use CoSetProxyBlanket or CoInitializeSecurity |
This rule states that developers should never use the CoSetProxyBlanket or CoInitializeSecurity APIs in PowerBuilder code. These APIs are used to set the authentication level for a COM object, which can be a security risk when used incorrectly. As such, they should be avoided when writing PowerBuilder code. |
Maintainability | Critical | Newline and control characters should not be used in string literals |
This rule states that when writing string literals in PowerBuilder code, newline and control characters should not be used. This is because these characters can cause unexpected behavior in the program, and can also be difficult to debug. It is best to stick to standard characters such as letters, numbers, and punctuation when writing string literals. |
Maintainability | Minor | Objects should not be duplicated (same name and same type) |
This rule states that objects should not be duplicated within the PowerBuilder code. This means that objects should not have the same name and type within the code. Duplicating objects can lead to confusion and errors, as the code may not be able to distinguish between the two objects. To avoid this, objects should be given unique names and types to ensure that the code runs correctly and that the objects are distinguishable from one another. |
Vulnerability | Critical | OS commands should not allow injection attacks |
The "OS commands should not allow injection attacks" rule states that when executing OS commands from PowerBuilder code, the commands should be validated to ensure that they cannot be used to inject malicious code into the system. This can be done by using parameterized queries, whitelisting accepted commands, or other methods of input validation. Additionally, the code should be written to ensure that any user-supplied data is properly escaped and sanitized to prevent malicious code from being injected into the system. |
Maintainability | Minor | PBLs should not exceed a certain size |
The rule "PBLs should not exceed a certain size" states that PowerBuilder Library (PBL) files should not be too large. This is important to ensure that the application runs efficiently and that it is not too difficult for developers to maintain. To ensure this, developers should limit the size of PBLs to a certain size, such as 2MB or 5MB, depending on the complexity of the application. This can be done by limiting the number of objects in the PBL, such as windows, user objects, and menus, and by ensuring that the code within each object is as efficient as possible. Additionally, developers should also periodically review the size of the PBLs and remove any unused objects or code. |
Maintainability | Major | Redundant pairs of parentheses should be removed |
The PowerBuilder code rule "Redundant pairs of parentheses should be removed" means that when writing PowerBuilder code, any redundant pairs of parentheses should be removed as they are not necessary and can make the code difficult to read and understand. Redundant parentheses can be removed by replacing them with a single set of parentheses or by simply removing them altogether. This rule helps to ensure that the code is well-structured and easier to read. |
Vulnerability | Critical | Regular expressions should not allow Denial of Service attacks |
This PowerBuilder code rule states that regular expressions should not be used in a way that could result in a Denial of Service (DoS) attack. A DoS attack is an attack that attempts to make a system or network resource unavailable to its intended users. Regular expressions can be used to match patterns in strings, but they can also be used to create malicious input that can overwhelm a system with requests. To prevent DoS attacks, regular expressions should be used with caution and be thoroughly tested before being deployed in a production environment. |
Bug | Major | Related IF/ELSIF statements and WHEN clauses in a CASE should not have the same condition |
This rule states that when using IF/ELSIF statements and WHEN clauses in a CASE statement, they should not have the same condition. This is because the conditions should be unique to each statement or clause, as having the same condition could result in an infinite loop or other unintended behavior. This rule helps ensure that the code is structured properly and that it runs as expected. |
Maintainability | Minor | Return of boolean expressions should not be wrapped into an if-then-else statement |
This PowerBuilder code rule states that boolean expressions should not be wrapped in an if-then-else statement. This means that when a boolean expression is used, the code should not be written in a way that requires an if-then-else statement to be used. The code should instead be written in a way that the boolean expression can be evaluated directly without the need for an if-then-else statement. |
Maintainability | Minor | Scripts must be commented |
This rule states that all scripts written in PowerBuilder must be commented. This means that any code written in a script must include comments that explain the purpose of the code and how it works. This will help other developers understand the code and make it easier to maintain. Additionally, comments can be used to document changes made to the code and to alert other developers of potential issues. Having well-commented code can also help with debugging and troubleshooting. Following this rule will help ensure that PowerBuilder code is well organized, easily maintained, and up to date. |
Maintainability | Minor | Scripts must not exceed a certain size |
This PowerBuilder code rule states that any scripts written must not exceed a certain size. This size is determined by the developer and can be set to whatever size is considered appropriate for the application. This rule helps ensure that scripts are organized and efficient, and that they do not become too large and difficult to maintain. This rule also encourages developers to break down large scripts into smaller, more manageable pieces. This helps to ensure that scripts are easier to read and maintain, and that they are more efficient and less prone to errors. |
Vulnerability | Critical | SOAP and INET objects should not be used |
This rule states that the SOAP and INET objects should not be used when writing PowerBuilder code. These objects are not supported by PowerBuilder and can cause instability and unexpected behavior. Instead, developers should use other supported objects such as the Web Service Proxy or the HTTP Client object. Using these objects will ensure that the code is stable and reliable. |
Maintainability | Major | Statements should be on separate lines | The PowerBuilder code rule "Statements should be on separate lines" states that each statement in a PowerBuilder program should be placed on a separate line. This helps to make the code more readable and easier to debug, as it is easier to identify individual statements when they are on separate lines. Additionally, this rule helps to ensure that any changes made to a particular statement are easily identifiable, as they will be on their own line. |
Maintainability | Minor | String literals should not be duplicated |
The "String literals should not be duplicated" PowerBuilder code rule states that when writing code, any string literals should be written only once. This means that when writing code, any strings that are used multiple times should be stored in a variable and the variable should be used instead of the literal string. This helps to make the code more efficient and maintainable, as any changes to the string can be done in one place instead of multiple places. |
Bug | Critical | Syntax Errors |
The PowerBuilder code rule "Syntax Errors" checks the syntax of PowerBuilder code for errors. This includes checking for missing semicolons, invalid keywords, and other syntax-related problems. The rule will report any syntax errors it finds, along with a description of the error and its location in the code. This helps developers quickly identify and fix any syntax-related issues in their PowerBuilder code. |
Maintainability | Critical | The JDBC database interface is removed from the Database painter |
The PowerBuilder code rule "The JDBC database interface is removed from the Database painter" means that the JDBC database interface is no longer available in the Database painter. This means that the Database painter will no longer be able to connect to databases using the JDBC interface. Instead, users will need to use other database interfaces to connect to databases. |
Maintainability | Critical | The OData database interface is removed from the Database painter |
The OData database interface has been removed from the Database painter in PowerBuilder code. This means that developers will no longer be able to access this interface from the Database painter, and instead must use other methods to access OData databases. This removal is likely intended to encourage developers to use more modern methods of accessing databases, such as through web services or through other more modern interfaces. |
Vulnerability | Critical | The OLE web browser should not be used anymore (not secure) |
The PowerBuilder code rule states that the OLE web browser should no longer be used, as it is not secure. This is because the OLE web browser is an outdated technology that is no longer supported or updated, and thus is vulnerable to security breaches. It is recommended that developers use more secure alternatives such as HTML or JavaScript. |
Maintainability | Critical | The XSLFOP! PDF method is removed from PowerScript |
The XSLFOP! PDF method has been removed from PowerScript in order to improve performance and reduce the complexity of the code. This method was used to generate PDF documents from PowerScript, but it was found to be inefficient and difficult to maintain. By removing this method, code will be simpler and more efficient, making it easier to maintain and debug. Additionally, the removal of this method will also improve the overall performance of PowerScript, as it will no longer need to process the unnecessary code. |
Maintainability | Major | Track uses of FIXME tags |
The PowerBuilder code rule "Track uses of FIXME tags" helps to keep track of any code that requires further attention or debugging. This rule will search through the code for any comments containing FIXME tags, and then log any instances of these tags in a log file. This log can then be used to quickly identify areas of the code that may need further attention or debugging. In addition, this rule can help developers to keep track of any tasks they need to complete, as well as any areas that may need to be refactored or improved. |
Maintainability | Information | Track uses of TODO tags |
The PowerBuilder code rule "Track uses of TODO tags" is used to track the use of TODO tags within code. TODO tags are used to denote items that need to be addressed in the future, such as bugs, features, or refactoring. This rule helps developers to keep track of these items and ensure that they are addressed in a timely manner. The rule works by scanning the code for any TODO tags and then records the location of the tags in a log. This log can then be used to review the progress of the TODO items and ensure that they are addressed in a timely manner. This rule can help to improve the quality of the code and ensure that any issues are addressed quickly and efficiently. It can also help to increase the visibility of any TODO items and ensure that they are addressed in a timely manner. |
Maintainability | Major | Two branches in a conditional structure should not have exactly the same implementation |
This rule states that when a conditional structure is used, the two branches should not have the same implementation. This means that the code executed in each branch should be different. This helps to ensure that the code is more organized and readable, and that the code runs as expected. |
Maintainability | Major | Unused event parameters should be removed |
This rule states that any event parameters that are not used in the PowerBuilder code should be removed. This is important because leaving unused event parameters can lead to unexpected behavior in the code, and can also lead to increased memory usage. Unused event parameters should be identified and removed to ensure the code is running optimally. |
Maintainability | Major | Unused function parameters should be removed |
The "Unused Function Parameters Should Be Removed" PowerBuilder code rule states that any function parameters that are not used within the body of the function should be removed. This helps to reduce the amount of code that needs to be maintained and ensures that unnecessary code is not included in the program. Additionally, it helps to improve readability by making the code easier to understand, and it can also improve performance by reducing the amount of code that needs to be processed. |
Maintainability | Minor | Unused global variables/constants should be removed |
This rule states that any global variables or constants that are not being used in the PowerBuilder code should be removed. This is important to keep the code clean and organized, and to avoid any unnecessary clutter. Unused variables and constants can also lead to potential errors or bugs in the code, so it is important to ensure that all global variables and constants are being used. |
Maintainability | Major | Unused labels should be removed |
This PowerBuilder code rule states that any labels which are no longer used in the code should be removed. This helps to ensure that the code is organized and easy to read, and that any unnecessary code is removed. Unused labels can be identified by searching the code for any labels which are not referenced anywhere else in the code. Once identified, these labels can be removed to help keep the code clean and organized. |
Maintainability | Minor | Unused local variables should be removed |
This rule states that all local variables that are declared but not used within a PowerBuilder code should be removed. This is to ensure that the code is as clean and efficient as possible, and that unnecessary variables are not taking up memory space. Additionally, this rule helps to identify any potential errors or typos that may have been made when declaring variables. By removing unused local variables, the code is easier to read, understand, and debug. |
Maintainability | Critical | Use the LoadWithDotNet function instead of LoadWithDotNetFramework and LoadWithDotNetCore functions |
Upgrade your .NET assembly to .NET 6.0 assembly and use the LoadWithDotNet function instead of LoadWithDotNetFramework and LoadWithDotNetCore functions, you must first ensure that your assembly is compatible with .NET 6.0. Once you have verified compatibility, you can use the LoadWithDotNet function to load the assembly into the PowerBuilder application. The LoadWithDotNet function is designed to work with .NET 6.0 assemblies, and it is a more efficient and reliable way to load assemblies compared to the LoadWithDotNetFramework and LoadWithDotNetCore functions. |
Vulnerability | Critical | User IDs and Passwords should not be Hardcoded |
This rule states that user IDs and passwords should not be hardcoded into any PowerBuilder code. This means that any references to user IDs and passwords should not be included in the code itself, but instead should be stored in a separate, secure location. This ensures that user credentials are kept confidential and secure, and that they can be easily updated when necessary. |
Vulnerability | Critical | User input should not allow path injection or path transversal attacks |
This PowerBuilder code rule states that user input should not be allowed to inject or traverse paths, as this could allow attackers to gain access to unauthorized areas of the system. Path injection and path transversal attacks involve maliciously manipulating the system's file paths to gain access to areas of the system that the user is not authorized to access. To prevent this, user input should be validated and filtered to ensure that only legitimate paths are allowed. Additionally, it is important to ensure that the system is configured to prevent users from accessing areas of the system that they do not have permission to access. |
Maintainability | Minor | Variables should comply with a naming convention |
The PowerBuilder code rule "Variables should comply with a naming convention" states that all variables used in a PowerBuilder application should be named according to a specific set of guidelines. This helps to ensure that all variables are easily identifiable and that they are used consistently throughout the code. The naming convention should specify the type of variable (e.g. integer, string, etc.), the length of the variable (if applicable), and any other specific requirements that may be applicable to the variable. By following a consistent naming convention, developers can ensure that their code is more organized, readable, and maintainable. |
Bug | Major | Variables should not be self-assigned |
The "Variables should not be self-assigned" PowerBuilder code rule states that variables should not be set to the same value they already contain. This means that any assignment statement that assigns a variable to itself should be avoided, as it is redundant and can lead to confusion and errors. Self-assignment can also lead to unexpected results, as the value of the variable may not be what was expected. For example, if a variable is assigned to itself within an if statement, the value of the variable may be changed even if the if statement condition is not met. |