Showing 105 of 105 total issues
Function completefunc
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
completefunc: function (xData) {
// Handle errors
$(xData.responseXML).find("errorstring").each(function () {
var errorText = $(this).text();
File SPDisplayRelatedInfo.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
define([
'jquery',
"../utils/constants",
'../core/SPServices.utils',
//---------------------------
File SPCascadeDropdowns.js
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
define([
'jquery',
'../utils/constants',
'../core/SPServices.utils',
//---------------------------
Function SPGetListItemsJson
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPGetListItemsJson = function (options) {
var opt = $.extend({}, {
webURL: "", // [Optional] URL of the target Web. If not specified, the current Web is used.
listName: "",
Function SPFindPeoplePicker
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPFindPeoplePicker = function (options) {
var opt = $.extend({}, {
peoplePickerDisplayName: "", // The displayName of the People Picker on the form
valueToSet: "", // The value to set the People Picker to. Should be a string containing each username or groupname separated by semi-colons.
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (typeof thisValue !== "undefined" && thisValue.indexOf(constants.spDelim) > 0) {
thisOption = new utils.SplitIndex(thisValue);
} else {
thisOption.id = $(this).attr("ows_ID");
thisOption.value = thisValue;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 90.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (typeof thisValue !== "undefined" && thisValue.indexOf(constants.spDelim) > 0) {
thisOption = new utils.SplitIndex(thisValue);
} else {
thisOption.id = $(this).attr("ows_ID");
thisOption.value = thisValue;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 90.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function SPRequireUnique
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPRequireUnique = function (options) {
var opt = $.extend({}, {
columnStaticName: "Title", // Name of the column
duplicateAction: 0, // 0 = warn, 1 = prevent
Similar blocks of code found in 2 locations. Consider refactoring. Open
$(thisMultiSelect.master.candidateControl).find("option").each(function () {
cloneObj.append("<option value='" + $(this).html() + "'>" + $(this).html() + "</option>");
});
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 89.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
$(thisMultiSelect.master.resultControl).find("option").each(function () {
cloneObj.append("<option value='" + $(this).val() + "'>" + $(this).html() + "</option>");
});
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 89.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function SPDisplayRelatedInfo
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPDisplayRelatedInfo = function (options) {
var opt = $.extend({}, {
listName: $().SPServices.SPListNameFromUrl(), // The list the form is working with. This is useful if the form is not in the list context.
columnName: "", // The display name of the column in the form
Function SPLookupAddNew
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPLookupAddNew = function (options) {
var opt = $.extend({}, {
lookupColumn: "", // The display name of the Lookup column
promptText: "Add new {0}", // Text to use as prompt + column name
Function completefunc
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
completefunc: function (xData) {
// Handle errors
$(xData.responseXML).find("errorstring").each(function () {
var errorText = $(this).text();
Similar blocks of code found in 2 locations. Consider refactoring. Open
QUnit.test("SPGetStaticFromDisplay", function(assert) {
assert.expect(1);
var thisStaticName = $().SPServices.SPGetStaticFromDisplay({
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 83.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function SPGetCurrentUser
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPGetCurrentUser = function (options) {
var opt = $.extend({}, {
webURL: "", // URL of the target Site Collection. If not specified, the current Web is used.
fieldName: "Name", // Specifies which field to return from the userdisp.aspx page
Similar blocks of code found in 2 locations. Consider refactoring. Open
QUnit.test("SPGetDisplayFromStatic", function(assert) {
assert.expect(1);
var thisDisplayName = $().SPServices.SPGetDisplayFromStatic({
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 83.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function SPUpdateMultipleListItems
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPUpdateMultipleListItems = function (options) {
var opt = $.extend({}, {
webURL: "", // [Optional] URL of the target Web. If not specified, the current Web is used.
listName: "", // The list to operate on.
Function SPArrangeChoices
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.SPServices.SPArrangeChoices = function (options) {
var opt = $.extend({}, {
listName: $().SPServices.SPListNameFromUrl(), // The list name for the current form
columnName: "", // The display name of the column in the form
Similar blocks of code found in 2 locations. Consider refactoring. Open
case "QueryEx":
SOAPEnvelope.opheader = "<" + opt.operation + " xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";
SOAPAction = "http://microsoft.com/webservices/OfficeServer/QueryService/" + opt.operation;
SOAPEnvelope.payload += utils.wrapNode("queryXml", constants.encodeXml(opt.queryXml));
break;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
case "GetQuerySuggestions":
SOAPEnvelope.opheader = "<" + opt.operation + " xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";
SOAPAction = "http://microsoft.com/webservices/OfficeServer/QueryService/" + opt.operation;
SOAPEnvelope.payload += utils.wrapNode("queryXml", constants.encodeXml(opt.queryXml));
break;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 75.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76