Showing 39 of 187 total issues
Function run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ queueId, name, userAgent, secret }) {
const queue = Queues.findOne(queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
Function run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ ticketId }) {
const ticket = Tickets.findOne(ticketId);
if (!ticket) {
throw new Meteor.Error(
"tickets.doesNotExist"`No ticket exists with id ${ticketId}`
Function sendTextNotification
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
static sendTextNotification(ticket) {
const queue = Queues.findOne(ticket.queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
Function up
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
up() {
const fishbowlWithLocation = Locations.findOne({
name: "CIT 271 (Fishbowl)"
});
const fishbowl = Locations.findOne({ name: "Fishbowl" });
Function run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ queueId }) {
const queue = Queues.findOne(queueId);
if (!queue || queue.status === "ended") {
throw new Meteor.Error(
"queues.doesNotExist"`No queue exists with id ${queueId}`
Function run
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ queueId }) {
const queue = Queues.findOne(queueId);
if (!queue || queue.status === "ended") {
throw new Meteor.Error(
"queues.doesNotExist"`No queue exists with id ${queueId}`
Function run
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ email, role, courseId }) {
// If specified, check if course exists
const course = Courses.findOne(courseId);
if (_.contains(["hta", "ta"], role) && !course) {
throw new Meteor.Error(
Function availableSettings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
availableSettings() {
if (!Meteor.user()) return [];
let settings = [
{
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
// Course
const testCourse = Courses.findOne({ name: "cs00" });
testCourseId = testCourse
? testCourse._id
Function sendEmailNotification
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
static sendEmailNotification(ticket) {
const queue = Queues.findOne(ticket.queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
Function run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
run({ queueId, name, locationId, scheduledEndTime }) {
const queue = Queues.findOne(queueId);
if (!queue || queue.status === "ended") {
throw new Meteor.Error(
"queues.doesNotExist"`No queue exists with id ${queueId}`
- 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
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
run({ queueId, sessionId }) {
const queue = Queues.findOne(queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
Function addStudentEmail
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.addStudentEmail = (email, callback) => {
email = email.toLowerCase(); // eslint-disable-line no-param-reassign
try {
new SimpleSchema({
email: {
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
run({ email, role, courseId }) {
// If specified, check if course exists
const course = Courses.findOne(courseId);
if (_.contains(["hta", "ta"], role) && !course) {
throw new Meteor.Error(
- 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
Function onCreated
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Template.ModalJoinQueue.onCreated(function onCreated() {
this.errors = new ReactiveDict();
this.studentEmails = new ReactiveArray([]);
this.addStudentEmail = (email, callback) => {
- 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
Function sendTextNotification
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static sendTextNotification(ticket) {
const queue = Queues.findOne(ticket.queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
- 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
Function sendEmailNotification
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static sendEmailNotification(ticket) {
const queue = Queues.findOne(ticket.queueId);
if (!queue) {
throw new Meteor.Error(
"queues.doesNotExist",
- 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
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
run({ ticketId }) {
const ticket = Tickets.findOne(ticketId);
if (!ticket || ticket.status === "deleted") {
throw new Meteor.Error(
"tickets.doesNotExist"`No ticket exists with id ${ticketId}`
- 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
Function onRendered
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Template.SettingsCourses.onRendered(function onRendered() {
this.autorun(() => {
const courseId = FlowRouter.getQueryParam("course");
if (!courseId && Meteor.user()) {
const courses = Meteor.user()
- 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"