Showing 50 of 109 total issues
Method FollowList
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
Open
@Composable
fun FollowList(activity: ComponentActivity, viewModel: FollowListViewModel){
Column {
Row(
Modifier
- 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 onCreate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d("HELLO TEST","HELLO")
var deezerApi = DeezerApiIntegration(deezerApiImplemented())
var codeValue: String? =""
Method onCreate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
OrkestTheme {
// A surface container using the 'background' color from the theme
Method getTrackName
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/**
* This function is used to get the track name from the Spotify API
*
* @param spotifyUri The Spotify song ID
* @return A CompletableFuture that contains the track name
Method onConfirmListener
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private fun onConfirmListener(context: Context, error: MutableState<Boolean>, errorMessage: MutableState<String>,
waiting: MutableState<Boolean>, userNotInDb: MutableState<Boolean>,
viewModel: AuthViewModel, auth: FirebaseAuth, navController: NavController){
Method startRecordingVideo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
context: Context,
filenameFormat: String,
videoCapture: VideoCapture<Recorder>,
outputDirectory: File,
executor: Executor,
Method SearchUi
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
Open
/**
* @param viewModel use to communicate with the Backend
*
*This method display the search bar, and support the drawing of the future users that will
* be find in the database
- 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 updateCameraPreview
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
fun updateCameraPreview(cameraProvider: ProcessCameraProvider, lifecycleOwner: LifecycleOwner, preview: Preview, videoCaptureRecorder: VideoCapture<Recorder>, selectedMode: MutableState<Boolean>){
Method updateUI
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private fun updateUI(user: FirebaseUser?, navController: NavController,
isInDatabase: Boolean, context: Context, viewModel: AuthViewModel
Method sendNotification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
fun sendNotification(title: String, message: String,
channelId: String, channelName: String, notificationId: Int) {