Showing 226 of 488 total issues
Method ExecuteTapGestureRecognizer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async Task ExecuteTapGestureRecognizer(View view)
{
var flowCell = view as IFlowViewCell;
if (flowCell != null)
{
Method ExecuteThemeSelectedCommand
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void ExecuteThemeSelectedCommand(string selectedTheme)
{
string themeCode = null;
if (!string.IsNullOrEmpty(selectedTheme) && string.Compare(selectedTheme, TR.Cancel) != 0) {
Method fontAdd
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static void fontAdd(string name, string typeface, bool beginning = false)
{
if (Device.RuntimePlatform == Device.Android) {
if (typeface != null) {
typeface = typeface + fontExtension + "#" + typeface;
Method GetCurrentCultureInfo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public System.Globalization.CultureInfo GetCurrentCultureInfo()
{
var netLanguage = "en";
var prefLanguageOnly = "en";
if (NSLocale.PreferredLanguages.Length > 0)
Method CreateSampleItems
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void CreateSampleItems()
{
var dal = DataAccessLayer.GetInstance();
// Banking
Method ExecuteSearchLaunchCommand
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void ExecuteSearchLaunchCommand()
{
if (!IsLocalClipboardActivated) {
SearchEntryShowHideCommandCallback.Invoke(false);
Method ToBytes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static byte[] ToBytes(string input)
{
if (string.IsNullOrEmpty(input)) {
return new byte[0];
}
Method delete
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void delete(ItemModel item)
{
bool isUsed = false;
var itemList = BL.GetAllItems();
var itemFromList = itemList.SingleOrDefault(
Method GetDataTemplates
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private IList<DataTemplate> GetDataTemplates(IList container)
{
List<DataTemplate> templates = new List<DataTemplate>();
var flowTemplateSelector = _flowColumnTemplate as FlowTemplateSelector;
Method searchByText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
List<ItemList> searchByText(string text)
{
var loweredText = text.ToLower();
var searchResult = new List<ItemList>();
foreach (var item in savedList) {
Method searchByText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
List<ItemList> searchByText(string text)
{
var loweredText = text.ToLower();
var searchResult = new List<ItemList>();
foreach (var item in savedList) {
Method AddColumnsToTablesUpgrade03
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public bool AddColumnsToTablesUpgrade03()
{
try {
CheckConnection();
BeginTransaction();
Method ShareFile
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void ShareFile(string fileName, string extraText, string mimeType, string popupText, Action action)
{
Intent intentShareFile = new Intent(Intent.ActionSend);
File fileWithinMyDir = new File(fileName);
Method DeleteItem
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void DeleteItem(string itemID, string changeTimestamp)
{
try
{
CheckConnection();
Method ReloadGroupedContainerList
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
Open
private void ReloadGroupedContainerList()
{
var colCount = DesiredColumnCount;
var flowGroupsList = new List<FlowGroup>(FlowItemsSource.Count);
var groupDisplayPropertyName = (FlowGroupDisplayBinding as Binding)?.Path;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ExecuteSaveFieldCommand
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
Open
protected void ExecuteSaveFieldCommand()
{
try {
string updText = null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setItemsList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void setItemsList(List<NSWItem> itemsList, bool setHeader = true)
{
var itemsStorage = new List<NSWFormsItemModel>();
if (itemsList != null) {
if (itemsList.Count == 0) {
Method GetButtons
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static Layout<View> GetButtons()
{
var mainLayout = new StackLayout();
mainLayout.SetBinding(VisualElement.IsVisibleProperty, "IsVisibleProp");
mainLayout.Orientation = StackOrientation.Horizontal;
Method ExecuteCreateCommand
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void ExecuteCreateCommand(object obj)
{
var iconModel = (IconModel)obj;
Method ChangeItemTitle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void ChangeItemTitle()
{
var currentState = BL.GetCurrentItem();
string changeTitle = null;
string emptyItem = null;