From f56fb6d774aa0ca6adedb29443a7cf39581fcf95 Mon Sep 17 00:00:00 2001 From: Sebastian Bauersfeld Date: Thu, 24 Jan 2019 16:09:06 -0500 Subject: [PATCH] Address review comments. --- .../semmle/code/configfiles/ConfigFiles.qll | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/java/ql/src/semmle/code/configfiles/ConfigFiles.qll b/java/ql/src/semmle/code/configfiles/ConfigFiles.qll index dd11fce6cbc..dd17aad2ef1 100644 --- a/java/ql/src/semmle/code/configfiles/ConfigFiles.qll +++ b/java/ql/src/semmle/code/configfiles/ConfigFiles.qll @@ -1,11 +1,11 @@ /** * Provides classes and predicates for working with configuration files, such - * as Java .properties or .ini files. + * as Java `.properties` or `.ini` files. */ import semmle.code.Location -/** Each element in a configuration file has a location. */ +/** An element in a configuration file has a location. */ abstract class ConfigLocatable extends @configLocatable { /** Gets the source location for this element. */ Location getLocation() { configLocations(this, result) } @@ -22,14 +22,14 @@ abstract class ConfigLocatable extends @configLocatable { * for applications, such as the port, name or address of a database. */ class ConfigPair extends @config, ConfigLocatable { - /** Gets the name of this ConfigPair, if any. */ + /** Gets the name of this `ConfigPair`, if any. */ ConfigName getNameElement() { configNames(result, this, _) } - /** Gets the value of this ConfigPair, if any. */ + /** Gets the value of this `ConfigPair`, if any. */ ConfigValue getValueElement() { configValues(result, this, _) } /** - * Gets the string value of the name of this ConfigPair if + * Gets the string value of the name of this `ConfigPair` if * it exists and the empty string if it doesn't. */ string getEffectiveName() { @@ -37,34 +37,34 @@ class ConfigPair extends @config, ConfigLocatable { } /** - * Gets the string value of the value of this ConfigPair if + * Gets the string value of the value of this `ConfigPair` if * it exists and the empty string if it doesn't. */ string getEffectiveValue() { if exists(getValueElement()) then result = getValueElement().getValue() else result = "" } - /** Gets a printable representation of this ConfigPair. */ + /** Gets a printable representation of this `ConfigPair`. */ override string toString() { result = getEffectiveName() + "=" + getEffectiveValue() } } -/** The name element of a ConfigPair. */ +/** The name element of a `ConfigPair`. */ class ConfigName extends @configName, ConfigLocatable { /** Gets the name as a string. */ string getName() { configNames(this, _, result) } - /** Gets a printable representation of this ConfigName. */ + /** Gets a printable representation of this `ConfigName`. */ override string toString() { result = getName() } } -/** The value element of a ConfigPair. */ +/** The value element of a `ConfigPair`. */ class ConfigValue extends @configValue, ConfigLocatable { /** Gets the value as a string. */ string getValue() { configValues(this, _, result) } - /** Gets a printable representation of this ConfigValue. */ + /** Gets a printable representation of this `ConfigValue`. */ override string toString() { result = getValue() } } -/** A Java property is a name-value pair in a .properties file. */ +/** A Java property is a name-value pair in a `.properties` file. */ class JavaProperty extends ConfigPair { JavaProperty() { getFile().getExtension() = "properties" } }